- cancelling of busy prime thread allowed

This commit is contained in:
Martin Willi 2005-12-06 11:51:40 +00:00
parent 668f9fcba9
commit d381f36608
1 changed files with 4 additions and 0 deletions

View File

@ -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);
}
}