&sd);
}
+/**
+ * g_async_queue_remove:
+ * @queue: a #GAsyncQueue
+ * @data: the @data to remove from the @queue
+ *
+ * Remove an item from the queue. This function does not block.
+ *
+ * Returns: %TRUE if the item was removed
+ *
+ * Since: 2.46
+ */
+gboolean
+g_async_queue_remove (GAsyncQueue *queue,
+ gpointer data)
+{
+ gboolean ret;
+
+ g_return_val_if_fail (queue != NULL, FALSE);
+ g_return_val_if_fail (data != NULL, FALSE);
+
+ g_mutex_lock (&queue->mutex);
+ ret = g_async_queue_remove_unlocked (queue, data);
+ g_mutex_unlock (&queue->mutex);
+
+ return ret;
+}
+
+/**
+ * g_async_queue_remove_unlocked:
+ * @queue: a #GAsyncQueue
+ * @data: the @data to remove from the @queue
+ *
+ * Remove an item from the queue. This function does not block.
+ *
+ * This function must be called while holding the @queue's lock.
+ *
+ * Returns: %TRUE if the item was removed
+ *
+ * Since: 2.46
+ */
+gboolean
+g_async_queue_remove_unlocked (GAsyncQueue *queue,
+ gpointer data)
+{
+ g_return_val_if_fail (queue != NULL, FALSE);
+ g_return_val_if_fail (data != NULL, FALSE);
+
+ return g_queue_remove (&queue->queue, data);
+}
+
+/**
+ * g_async_queue_push_front:
+ * @queue: a #GAsyncQueue
+ * @data: @data to push into the @queue
+ *
+ * Pushes the @data into the @queue. @data must not be %NULL.
+ * In contrast to g_async_queue_push(), this function
+ * pushes the new item ahead of the items already in the queue,
+ * so that it will be the next one to be popped off the queue.
+ *
+ * Since: 2.46
+ */
+void
+g_async_queue_push_front (GAsyncQueue *queue,
+ gpointer data)
+{
+ g_return_if_fail (queue != NULL);
+ g_return_if_fail (data != NULL);
+
+ g_mutex_lock (&queue->mutex);
+ g_async_queue_push_front_unlocked (queue, data);
+ g_mutex_unlock (&queue->mutex);
+}
+
+/**
+ * g_async_queue_push_front_unlocked:
+ * @queue: a #GAsyncQueue
+ * @data: @data to push into the @queue
+ *
+ * Pushes the @data into the @queue. @data must not be %NULL.
+ * In contrast to g_async_queue_push_unlocked(), this function
+ * pushes the new item ahead of the items already in the queue,
+ * so that it will be the next one to be popped off the queue.
+ *
+ * This function must be called while holding the @queue's lock.
+ *
+ * Since: 2.46
+ */
+void
+g_async_queue_push_front_unlocked (GAsyncQueue *queue,
+ gpointer data)
+{
+ g_return_if_fail (queue != NULL);
+ g_return_if_fail (data != NULL);
+
+ g_queue_push_tail (&queue->queue, data);
+ if (queue->waiting_threads > 0)
+ g_cond_signal (&queue->cond);
+}
+
/*
* Private API
*/