diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/charon/threads/prime_pool.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/charon/threads/prime_pool.c b/Source/charon/threads/prime_pool.c index cee51d8f7..b5c879677 100644 --- a/Source/charon/threads/prime_pool.c +++ b/Source/charon/threads/prime_pool.c @@ -301,6 +301,10 @@ void generate_primes(private_prime_pool_t *this) selected_prime_list->primes->insert_last(selected_prime_list->primes, (void*)prime); pthread_mutex_unlock(&(this->mutex)); } + /* abort if requested */ + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + pthread_testcancel(); + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); } } |