summaryrefslogtreecommitdiffstatshomepage
path: root/py/modthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/modthread.c')
-rw-r--r--py/modthread.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/py/modthread.c b/py/modthread.c
index 1306dc642b..64fbb3f198 100644
--- a/py/modthread.c
+++ b/py/modthread.c
@@ -171,6 +171,9 @@ STATIC void *thread_entry(void *args_in) {
mp_pystack_init(mini_pystack, &mini_pystack[128]);
#endif
+ // The GC starts off unlocked on this thread.
+ ts.gc_lock_depth = 0;
+
// set locals and globals from the calling context
mp_locals_set(args->dict_locals);
mp_globals_set(args->dict_globals);