Commit Graph

7 Commits

Author SHA1 Message Date
Emmanuele Bassi
e49b05049a Allow disabling the timeline pool via environment variables
All the ClutterTimeline share a ClutterTimeoutPool by default. This might
cause problems if an application is using a heavily threaded library that
does not play nicely with the main loop (like libneon). If this is the
case, using the CLUTTER_TIMELINE environment variable set to "no-pool"
makes the ClutterTimeline objects discard the pool and allocate a slice
of the main loop.
2007-06-21 14:19:56 +00:00
Emmanuele Bassi
7d18616cfa Remove locking from ClutterTimeoutPool
The mutex protection for the timeout pool was causing deadlocks, so it has been
removed for the time being, until I figure out a way to make it work properly.
A timeout pool should not be considered thread-safe (or thread-aware) until further
notice.
2007-06-14 19:57:36 +00:00
Emmanuele Bassi
ba0fa9d4be 2007-06-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-timeout-pool.c: Make ClutterTimeoutPool
	more thread-safe, using a static lock.

	(clutter_timeout_pool_dispatch), (clutter_timeout_pool_remove): Fix
	a race condition-turned-in-memory corruption bug, triggered by
	removing a timeout from the pool while still spinning the pool
	source.
2007-06-14 12:00:31 +00:00
Emmanuele Bassi
a633e922b1 Compilation fixes 2007-06-09 13:20:22 +00:00
Emmanuele Bassi
d41a60a371 Document ClutterTimeoutPool
Add ClutterTimeoutPool API documentation to the source and to the
gtk-doc sections.
2007-06-09 13:20:13 +00:00
Emmanuele Bassi
787ddc3122 Add copyright license and make ClutterTimeoutPool public
ClutterTimeoutPool can be useful for manually animating without using
timelines or behaviours.
2007-06-09 13:20:06 +00:00
Emmanuele Bassi
7f4b6b9c0e Add timeout pool source
A ClutterTimeoutPool is a source for the GLib main loop which pools
multiple timeout functions. The pool is always sorted so that the first
timeout to expire is also the first element of the pool; hence, extraction
is a constant time operation. This also makes the usage of multiple
timeouts at the same priority not compete for a timeslice of the main
loop, leading to starvation.
2007-06-09 13:19:52 +00:00