Add a check for single-thread mutator (#4665)
This commit is contained in:
committed by
Vasily Levchenko
parent
c12d79176a
commit
9e99932b24
@@ -107,6 +107,9 @@ RuntimeState* initRuntime() {
|
|||||||
result->memoryState = InitMemory(false); // The argument will be ignored for legacy DestroyRuntimeMode
|
result->memoryState = InitMemory(false); // The argument will be ignored for legacy DestroyRuntimeMode
|
||||||
result->worker = WorkerInit(true);
|
result->worker = WorkerInit(true);
|
||||||
firstRuntime = atomicAdd(&aliveRuntimesCount, 1) == 1;
|
firstRuntime = atomicAdd(&aliveRuntimesCount, 1) == 1;
|
||||||
|
if (CurrentMemoryModel == MemoryModel::kExperimental) {
|
||||||
|
RuntimeCheck(firstRuntime, "Experimental MM does not support multiple mutator threads yet");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case DESTROY_RUNTIME_ON_SHUTDOWN:
|
case DESTROY_RUNTIME_ON_SHUTDOWN:
|
||||||
// First update `aliveRuntimesCount` and then update `globalRuntimeStatus`, for synchronization with
|
// First update `aliveRuntimesCount` and then update `globalRuntimeStatus`, for synchronization with
|
||||||
|
|||||||
Reference in New Issue
Block a user