WorkerThreadPool (plus friends): Overhaul unlock allowance zones
This fixes a rare but possible deadlock, maybe due to undefined behavior. The new implementation is safer, at the cost of some added boilerplate.
This commit is contained in:
parent
df23858488
commit
f4d76853b9
12 changed files with 118 additions and 110 deletions
|
|
@ -33,14 +33,6 @@
|
|||
#include "core/config/project_settings.h"
|
||||
#include "core/os/os.h"
|
||||
|
||||
void CommandQueueMT::lock() {
|
||||
mutex.lock();
|
||||
}
|
||||
|
||||
void CommandQueueMT::unlock() {
|
||||
mutex.unlock();
|
||||
}
|
||||
|
||||
CommandQueueMT::CommandQueueMT() {
|
||||
command_mem.reserve(DEFAULT_COMMAND_MEM_SIZE_KB * 1024);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue