summaryrefslogtreecommitdiffstatshomepage
path: root/py/objcomplex.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-03-20 18:42:27 +1100
committerDamien George <damien.p.george@gmail.com>2017-03-20 18:42:27 +1100
commit1a5c8d1053b391ea0ce260b882a1f1026ee7a6e0 (patch)
tree4d4d168028dc0889ff2aa2f81df5ebeb8d6a917c /py/objcomplex.c
parent231cfc84a7cae31f93208c334fc33b08278040eb (diff)
downloadmicropython-1a5c8d1053b391ea0ce260b882a1f1026ee7a6e0.tar.gz
micropython-1a5c8d1053b391ea0ce260b882a1f1026ee7a6e0.zip
py/vm: Don't release the GIL if the scheduler is locked.
The scheduler being locked general means we are running a scheduled function, and switching to another thread violates that, so don't switch in such a case (even though we technically could). And if we are running a scheduled function then we want to finish it ASAP, so we shouldn't switch to another thread. Furthermore, ports with threading enabled will lock the scheduler during a hard IRQ, and this patch to the VM will make sure that threads are not switched during a hard IRQ (which would crash the VM).
Diffstat (limited to 'py/objcomplex.c')
0 files changed, 0 insertions, 0 deletions