diff options
author | Damien George <damien.p.george@gmail.com> | 2017-04-12 13:52:04 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-04-12 13:52:04 +1000 |
commit | c7e8c6f7dec539aae4ca6445541533bfbc1a1405 (patch) | |
tree | 33abba94bd71b6ecb74ae99ac16dfc5fe5b66c45 /docs/esp8266/tutorial/adc.rst | |
parent | 08242eed2677cde806fd9c0de33138a8491293a2 (diff) | |
download | micropython-c7e8c6f7dec539aae4ca6445541533bfbc1a1405.tar.gz micropython-c7e8c6f7dec539aae4ca6445541533bfbc1a1405.zip |
py/gc: Execute finaliser code in a protected environment.
If a finaliser raises an exception then it must not propagate through the
GC sweep function. This patch protects against such a thing by running
finaliser code via the mp_call_function_1_protected call.
This patch also adds scheduler lock/unlock calls around the finaliser
execution to further protect against any possible reentrancy issues: the
memory manager is already locked when doing a collection, but we also don't
want to allow any scheduled code to run, KeyboardInterrupts to interupt the
code, nor threads to switch.
Diffstat (limited to 'docs/esp8266/tutorial/adc.rst')
0 files changed, 0 insertions, 0 deletions