mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 19:50:30 +01:00
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:
@@ -829,6 +829,12 @@ typedef double mp_float_t;
|
||||
#define MICROPY_PY_THREAD (0)
|
||||
#endif
|
||||
|
||||
// Whether to make the VM/runtime thread-safe using a global lock
|
||||
// If not enabled then thread safety must be provided at the Python level
|
||||
#ifndef MICROPY_PY_THREAD_GIL
|
||||
#define MICROPY_PY_THREAD_GIL (MICROPY_PY_THREAD)
|
||||
#endif
|
||||
|
||||
// Extended modules
|
||||
|
||||
#ifndef MICROPY_PY_UCTYPES
|
||||
|
||||
Reference in New Issue
Block a user