diff options
| author | Simon Rettberg | 2020-07-27 12:56:35 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2020-07-27 12:56:35 +0200 |
| commit | 1f212fa1fd0a381b42175dc1bac79baa164e1e45 (patch) | |
| tree | 7d911d7fe40817cbb433acebc3ed735eafe9c6df /src/server/threadpool.h | |
| parent | [FUSE] Tweak timeout values to prevent stale status file (diff) | |
| parent | [SERVER] Fix: NULL pointer access in saveLoadAllCacheMaps() (diff) | |
| download | dnbd3-1f212fa1fd0a381b42175dc1bac79baa164e1e45.tar.gz dnbd3-1f212fa1fd0a381b42175dc1bac79baa164e1e45.tar.xz dnbd3-1f212fa1fd0a381b42175dc1bac79baa164e1e45.zip | |
Merge branch 'no-working-flag' into fuse_ll
Diffstat (limited to 'src/server/threadpool.h')
| -rw-r--r-- | src/server/threadpool.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server/threadpool.h b/src/server/threadpool.h index 15dd151..d8a526e 100644 --- a/src/server/threadpool.h +++ b/src/server/threadpool.h @@ -18,12 +18,18 @@ bool threadpool_init(int maxIdleThreadCount); void threadpool_close(); /** + * Block until all threads spawned have exited + */ +void threadpool_waitEmpty(); + +/** * Run a thread using the thread pool. * @param startRoutine function to run in new thread * @param arg argument to pass to thead + * @param name STRING CONSTANT (literal) for debugging purposes * @return true if thread was started */ -bool threadpool_run(void *(*startRoutine)(void *), void *arg); +bool threadpool_run(void *(*startRoutine)(void *), void *arg, const char *name); #endif |
