aboutsummaryrefslogtreecommitdiff
path: root/ports/javascript
diff options
context:
space:
mode:
authorDamien George2020-02-06 01:05:47 +1100
committerDamien George2020-02-07 16:08:20 +1100
commit98a3911c430b0cc96e1821d7ca589b9be3355fc3 (patch)
tree1182ab05b8366c85f40700548bd003d2a6bd3597 /ports/javascript
parent7a5752a7489f6be1c7307455b33119888392a09d (diff)
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.
Diffstat (limited to 'ports/javascript')
-rw-r--r--ports/javascript/mpconfigport.h8
1 files changed, 4 insertions, 4 deletions
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()