From 98a3911c430b0cc96e1821d7ca589b9be3355fc3 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 6 Feb 2020 01:05:47 +1100 Subject: 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. --- ports/javascript/mpconfigport.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ports/javascript') diff --git a/ports/javascript/mpconfigport.h b/ports/javascript/mpconfigport.h index 8ea43d84c..bc4e05343 100644 --- a/ports/javascript/mpconfigport.h +++ b/ports/javascript/mpconfigport.h @@ -135,8 +135,8 @@ extern const struct _mp_obj_module_t mp_module_utime; #if MICROPY_PY_THREAD #define MICROPY_EVENT_POLL_HOOK \ do { \ - extern void mp_handle_pending(void); \ - mp_handle_pending(); \ + extern void mp_handle_pending(bool); \ + mp_handle_pending(true); \ if (pyb_thread_enabled) { \ MP_THREAD_GIL_EXIT(); \ pyb_thread_yield(); \ @@ -149,8 +149,8 @@ extern const struct _mp_obj_module_t mp_module_utime; #else #define MICROPY_EVENT_POLL_HOOK \ do { \ - extern void mp_handle_pending(void); \ - mp_handle_pending(); \ + extern void mp_handle_pending(bool); \ + mp_handle_pending(true); \ } while (0); #define MICROPY_THREAD_YIELD() -- cgit v1.2.3