py: Implement a simple global interpreter lock.

This makes the VM/runtime thread safe, at the cost of not being able to
run code in parallel.
This commit is contained in:
Damien George
2016-05-26 10:42:53 +00:00
parent 1f54ad2aed
commit 4cec63a9db
6 changed files with 35 additions and 0 deletions

View File

@@ -1263,6 +1263,10 @@ pending_exception_check:
RAISE(obj);
}
// TODO make GIL release more efficient
MP_THREAD_GIL_EXIT();
MP_THREAD_GIL_ENTER();
} // for loop
} else {