GAsyncQueue: Add some useful api

The underlying queue supports removing and pushing items to
the front, and these operations can sometimes be useful.

https://bugzilla.gnome.org/show_bug.cgi?id=751160
This commit is contained in:
Matthias Clasen
2015-06-18 10:26:14 -04:00
parent 5574315b52
commit b662c6f09f
3 changed files with 117 additions and 0 deletions

View File

@@ -97,6 +97,19 @@ void g_async_queue_sort_unlocked (GAsyncQueue *queue,
GCompareDataFunc func,
gpointer user_data);
GLIB_AVAILABLE_IN_2_46
gboolean g_async_queue_remove (GAsyncQueue *queue,
gpointer item);
GLIB_AVAILABLE_IN_2_46
gboolean g_async_queue_remove_unlocked (GAsyncQueue *queue,
gpointer item);
GLIB_AVAILABLE_IN_2_46
void g_async_queue_push_front (GAsyncQueue *queue,
gpointer item);
GLIB_AVAILABLE_IN_2_46
void g_async_queue_push_front_unlocked (GAsyncQueue *queue,
gpointer item);
GLIB_DEPRECATED_FOR(g_async_queue_timeout_pop)
gpointer g_async_queue_timed_pop (GAsyncQueue *queue,
GTimeVal *end_time);