deleting consumer thread on pool destruction
Este cometimento está contido em:
1 ascendente
9086dee75d
cometimento
b71675077a
3 ficheiros modificados
+30
-22
Não existem ficheiros que correspondam à sua pesquisa
@@ -143,7 +143,13 @@ class MemoryPool {
|
||||
}
|
||||
|
||||
~MemoryPool() {
|
||||
std::lock_guard<mutex_t> lock(write_mutex_);
|
||||
|
||||
Flush();
|
||||
PTHREAD_CALL(pthread_cancel(consumer_thread_));
|
||||
void *res;
|
||||
PTHREAD_CALL(pthread_join(consumer_thread_, &res));
|
||||
if (res != PTHREAD_CANCELED) EXC_ABORT(ROCTRACER_STATUS_ERROR, "consumer thread wasn't stopped correctly");
|
||||
allocator_default(&pool_begin_, 0, alloc_arg_);
|
||||
}
|
||||
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador