diff options
| author | jepler <jepler@gmail.com> | 2019-09-09 20:04:20 -0500 |
|---|---|---|
| committer | jepler <jepler@gmail.com> | 2019-09-09 20:14:02 -0500 |
| commit | 932ac0960b01029701e6e53bb5eb9adafb182d41 (patch) | |
| tree | 22a92170f812e06e93a9e1c1a6510f74db4c1697 | |
| parent | 676f7aa80821aa681030a5c43ce7e6c03b65241b (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.c | 1 |
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; |
