summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/tevent/tevent.h11
-rw-r--r--lib/tevent/tevent_queue.c5
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index 7ad566c69e..3b170a4dc8 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -1435,6 +1435,17 @@ void tevent_queue_stop(struct tevent_queue *queue);
*/
size_t tevent_queue_length(struct tevent_queue *queue);
+/**
+ * @brief Is the tevent queue running.
+ *
+ * The queue is started by default.
+ *
+ * @param[in] queue The queue.
+ *
+ * @return Wether the queue is running or not..
+ */
+bool tevent_queue_running(struct tevent_queue *queue);
+
typedef int (*tevent_nesting_hook)(struct tevent_context *ev,
void *private_data,
uint32_t level,
diff --git a/lib/tevent/tevent_queue.c b/lib/tevent/tevent_queue.c
index 3715c35e4f..446804c9a5 100644
--- a/lib/tevent/tevent_queue.c
+++ b/lib/tevent/tevent_queue.c
@@ -215,3 +215,8 @@ size_t tevent_queue_length(struct tevent_queue *queue)
{
return queue->length;
}
+
+bool tevent_queue_running(struct tevent_queue *queue)
+{
+ return queue->running;
+}