py/scheduler: Add "raise_exc" argument to mp_handle_pending.
Previous behaviour is when this argument is set to "true", in which case the function will raise any pending exception. Setting it to "false" will cancel any pending exception.
This commit is contained in:
@@ -466,7 +466,7 @@ STATIC mp_obj_t extra_coverage(void) {
|
||||
mp_sched_unlock();
|
||||
|
||||
// shouldn't do anything while scheduler is locked
|
||||
mp_handle_pending();
|
||||
mp_handle_pending(true);
|
||||
|
||||
// unlock scheduler
|
||||
mp_sched_unlock();
|
||||
@@ -474,7 +474,7 @@ STATIC mp_obj_t extra_coverage(void) {
|
||||
|
||||
// drain pending callbacks
|
||||
while (mp_sched_num_pending()) {
|
||||
mp_handle_pending();
|
||||
mp_handle_pending(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user