pthreadpool: maintain a global list of orphaned pthreadpool_tevent_jobs
commit25756425aaf5465e56ea809cd415b6a387848919
authorStefan Metzmacher <metze@samba.org>
Wed, 20 Jun 2018 11:38:19 +0000 (20 13:38 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 12 Jul 2018 12:25:19 +0000 (12 14:25 +0200)
tree3d0e0f838fc5f52d2d61d21f784e0bdc538855a0
parentfa070d90074629cb8262bc4e2a6ceef57a9fbd5c
pthreadpool: maintain a global list of orphaned pthreadpool_tevent_jobs

Instead of leaking the memory forever, we retry the cleanup,
if other pthreadpool_tevent_*() functions are used.

pthreadpool_tevent_cleanup_orphaned_jobs() could also be called
by external callers.

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