1
0
Fork 0
mutter-performance-source/clutter/clutter-timeout-pool.h
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

21 lines
829 B
C

#ifndef __CLUTTER_TIMEOUT_POOL_H__
#define __CLUTTER_TIMEOUT_POOL_H__
#include <glib.h>
G_BEGIN_DECLS
typedef struct _ClutterTimeoutPool ClutterTimeoutPool;
ClutterTimeoutPool *clutter_timeout_pool_new (gint priority);
guint clutter_timeout_pool_add (ClutterTimeoutPool *pool,
guint interval,
GSourceFunc func,
gpointer data,
GDestroyNotify notify);
void clutter_timeout_pool_remove (ClutterTimeoutPool *pool,
guint id);
G_END_DECLS
#endif /* __CLUTTER_TIMEOUT_POOL_H__ */