diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-09-29 15:41:41 +0200 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-09-29 16:06:03 +0200 |
| commit | 939b9a8deae07c2f06aa16c08f3ddad70f97b261 (patch) | |
| tree | 00245f8e747349ddcca171be878e5ac19e8110a4 /liblangdet/threadpool.c | |
| parent | 91c6aa07597462705a7f30ee5b97e2c7943b5616 (diff) | |
| download | langdet-939b9a8deae07c2f06aa16c08f3ddad70f97b261.tar.gz langdet-939b9a8deae07c2f06aa16c08f3ddad70f97b261.zip | |
Diffstat (limited to 'liblangdet/threadpool.c')
| -rw-r--r-- | liblangdet/threadpool.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/liblangdet/threadpool.c b/liblangdet/threadpool.c index 6cb4252..e0ffbc6 100644 --- a/liblangdet/threadpool.c +++ b/liblangdet/threadpool.c @@ -93,6 +93,9 @@ void tp_set_threads(int n) { n = 1; #endif + if (n == tp.n_threads) + return; + /* Shutdown existing workers */ if (tp.n_threads > 1) { pthread_mutex_lock(&tp.mutex); |
