Christof's idea from
https://lists.samba.org/archive/samba-technical/2017-December/124384.html
was that the thread already exited. It could also be that the thread is
not yet idle when the new pthreadpool_add_jobs comes around the corner.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Wed Dec 13 04:46:12 CET 2017 on sn-devel-144
#include <pthreadpool_tevent.h>
#include <cmocka.h>
#include <pthreadpool_tevent.h>
#include <cmocka.h>
struct pthreadpool_tevent_test {
struct tevent_context *ev;
struct pthreadpool_tevent_test {
struct tevent_context *ev;
assert_return_code(ret, 0);
assert_false(in_main_thread);
assert_return_code(ret, 0);
assert_false(in_main_thread);
/*
* Workerthread will still be active for a second; immediately
* running another job will also use the worker thread, even
/*
* Workerthread will still be active for a second; immediately
* running another job will also use the worker thread, even