How to exit from thread_pool_start () ?

How to exit from thread_pool_start () ?

If I do thread_pool_create () with flags:
#define POOL_FLAG_EXIT_SELF 0x00000001
#define POOL_FLAG_USE_SELF 0x00000002
thread_pool_start () doesn’t return;

I’ve found (in dispatch.h) additional constants:
#define POOL_FLAG_EXITING 0x00000004
#define POOL_FLAG_CHANGING 0x00000008,
but can’t find what they mean;

PS
what happens when I start thread
with flag(s): ( POOL_FLAG_EXIT_SELF || POOL_FLAG_USE_SELF ) ?

If you want thread_pool_start() return, just don’t set
any flag.

if only POOL_FLAG_EXIT_SELF is set, then the thread
who call “thread_pool_start()” will “exit” (that is,
call pthread_exit() at the end)

if POOL_FLAG_USE_SELF is set (no mater EXIT_SELF is
set or not), it obeys USE_SELF.

-xtang

Q <no@spam.pl> wrote:

How to exit from thread_pool_start () ?

If I do thread_pool_create () with flags:
#define POOL_FLAG_EXIT_SELF 0x00000001
#define POOL_FLAG_USE_SELF 0x00000002
thread_pool_start () doesn’t return;

I’ve found (in dispatch.h) additional constants:
#define POOL_FLAG_EXITING 0x00000004
#define POOL_FLAG_CHANGING 0x00000008,
but can’t find what they mean;

PS
what happens when I start thread
with flag(s): ( POOL_FLAG_EXIT_SELF || POOL_FLAG_USE_SELF ) ?