summaryrefslogtreecommitdiff
path: root/extmod/uasyncio/task.py
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2020-04-03 14:15:18 +1100
committerDamien George <damien.p.george@gmail.com>2020-04-13 21:55:47 +1000
commit243805d776a19b16545d542b2f51ae88b6e314fe (patch)
tree939e150defb51389c670ba20585876f32947dca3 /extmod/uasyncio/task.py
parentc2cfbcc8d491d225cddbce71de5052ba8048c121 (diff)
py/scheduler: Fix race in checking scheduler pending state.
Because the atomic section starts after checking whether the scheduler state is pending, it's possible it can become a different state by the time the atomic section starts. This is especially likely on ports where MICROPY_BEGIN_ATOMIC_SECTION is implemented with a mutex (i.e. it might block), but the race exists regardless, i.e. if a context switch occurs between those two lines.
Diffstat (limited to 'extmod/uasyncio/task.py')
0 files changed, 0 insertions, 0 deletions