Skip to content

Commit 932ac09

Browse files
committed
stream_readall: This can be long-running, run background tasks
While finding sources of clicks and buzzes in nrf i2sout, I identified this site as one which could be long running. Reproducer code was to play a 22.05kHz sample and repeatedly print `os.listdir('')`
1 parent 676f7aa commit 932ac09

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

py/stream.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ STATIC mp_obj_t stream_readall(mp_obj_t self_in) {
341341
p = vstr_extend(&vstr, DEFAULT_BUFFER_SIZE);
342342
current_read = DEFAULT_BUFFER_SIZE;
343343
}
344+
RUN_BACKGROUND_TASKS;
344345
}
345346

346347
vstr.len = total_size;

0 commit comments

Comments
 (0)