We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5008008 commit 149927aCopy full SHA for 149927a
py/scheduler.c
@@ -88,7 +88,9 @@ static inline void mp_sched_run_pending(void) {
88
89
#if MICROPY_SCHEDULER_STATIC_NODES
90
// Run all pending C callbacks.
91
- while (MP_STATE_VM(sched_head) != NULL) {
+ // Warning: if C callbacks themserlves schedule new C callbacks this
92
+ // loop will never exit.
93
+ while (MP_STATE_VM(sched_head) != NULL && !pass_finished) {
94
mp_sched_node_t *node = MP_STATE_VM(sched_head);
95
MP_STATE_VM(sched_head) = node->next;
96
if (MP_STATE_VM(sched_head) == NULL) {
0 commit comments