diff options
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); |
