Merge pull request #9198 from KonduitAI/qwr_fixSeg

fix segfault (threading: tryAcquire)
master
Adam Gibson 2021-03-01 22:14:24 +09:00 committed by GitHub
commit 2ae9f58909
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ namespace samediff {
Ticket* ThreadPool::tryAcquire(int numThreads) { Ticket* ThreadPool::tryAcquire(int numThreads) {
//std::vector<BlockingQueue<CallableWithArguments*>*> queues; //std::vector<BlockingQueue<CallableWithArguments*>*> queues;
if(numThreads<=0) return nullptr;
Ticket *t = nullptr; Ticket *t = nullptr;
// we check for threads availability first // we check for threads availability first
bool threaded = false; bool threaded = false;