X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;ds=sidebyside;f=timeeventq.c;fp=timeeventq.c;h=78513aa961a46bb6e3b1be45b3c1ac53a2449165;hb=bf2db17686a0e29b4e855cadbbaa5e5e4ed2def8;hp=ec1a074b75a9224feff97755f45ef3f731032431;hpb=4128ce517280dde1e09d0d86b570f5a413812494;p=catta diff --git a/timeeventq.c b/timeeventq.c index ec1a074..78513aa 100644 --- a/timeeventq.c +++ b/timeeventq.c @@ -74,7 +74,7 @@ static gboolean dispatch_func(GSource *source, GSourceFunc callback, gpointer us return TRUE; } -flxTimeEventQueue* flx_time_event_queue_new(GMainContext *context) { +flxTimeEventQueue* flx_time_event_queue_new(GMainContext *context, gint priority) { flxTimeEventQueue *q; static GSourceFuncs source_funcs = { @@ -89,6 +89,8 @@ flxTimeEventQueue* flx_time_event_queue_new(GMainContext *context) { q = (flxTimeEventQueue*) g_source_new(&source_funcs, sizeof(flxTimeEventQueue)); q->prioq = flx_prio_queue_new(compare); + g_source_set_priority((GSource*) q, priority); + g_source_attach(&q->source, context); return q;