Skip to content

Commit c138b21

Browse files
committed
unix: Use mp_handle_pending() in time.sleep().
1 parent 6e74d24 commit c138b21

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

unix/modtime.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@ STATIC mp_obj_t mod_time_sleep(mp_obj_t arg) {
108108
if (res != -1 || errno != EINTR) {
109109
break;
110110
}
111-
if (MP_STATE_VM(mp_pending_exception) != MP_OBJ_NULL) {
112-
return mp_const_none;
113-
}
111+
mp_handle_pending();
114112
//printf("select: EINTR: %ld:%ld\n", tv.tv_sec, tv.tv_usec);
115113
#else
116114
break;

0 commit comments

Comments
 (0)