summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjepler <jepler@gmail.com>2019-09-09 20:04:20 -0500
committerjepler <jepler@gmail.com>2019-09-09 20:14:02 -0500
commit932ac0960b01029701e6e53bb5eb9adafb182d41 (patch)
tree22a92170f812e06e93a9e1c1a6510f74db4c1697
parent676f7aa80821aa681030a5c43ce7e6c03b65241b (diff)
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('')`
-rw-r--r--py/stream.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/stream.c b/py/stream.c
index 08c749cc3..482cae1fc 100644
--- a/py/stream.c
+++ b/py/stream.c
@@ -341,6 +341,7 @@ STATIC mp_obj_t stream_readall(mp_obj_t self_in) {
p = vstr_extend(&vstr, DEFAULT_BUFFER_SIZE);
current_read = DEFAULT_BUFFER_SIZE;
}
+ RUN_BACKGROUND_TASKS;
}
vstr.len = total_size;