pthreadpool: add pthreadpool_tevent_max_threads() and pthreadpool_tevent_queued_jobs()
authorStefan Metzmacher <metze@samba.org>
Thu, 21 Jun 2018 23:01:42 +0000 (01:01 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 12 Jul 2018 12:25:18 +0000 (14:25 +0200)
commite4dfd3da94c097fa9cd3fea4ad6dfc4af8ca2a45
treeeded532cfb130698abb1152d884fd59b1dc81f36
parent505d298e81570bb118a9b82e5166a8f11139750b
pthreadpool: add pthreadpool_tevent_max_threads() and pthreadpool_tevent_queued_jobs()

These can be used to implement some kind of flow control in the caller.
E.g. unless pthreadpool_tevent_queued_jobs() is lower than
pthreadpool_tevent_max_threads() is good to prepare new jobs.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
lib/pthreadpool/pthreadpool_tevent.c
lib/pthreadpool/pthreadpool_tevent.h