summaryrefslogtreecommitdiffstatshomepage
path: root/lib/tinytest/tinytest.c
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2024-09-04 17:18:38 +1000
committerDamien George <damien@micropython.org>2024-09-19 13:17:01 +1000
commit5d8878b582b8b68d19ab02adfe32d683d5ea512f (patch)
tree672939c19f6dbf70088aa5459c108af5fbfe75d8 /lib/tinytest/tinytest.c
parent52a593cdb14ed732b5580bbed39c0325815adedf (diff)
downloadmicropython-5d8878b582b8b68d19ab02adfe32d683d5ea512f.tar.gz
micropython-5d8878b582b8b68d19ab02adfe32d683d5ea512f.zip
shared/tinyusb: Only run TinyUSB on the main thread if GIL is disabled.
If GIL is disabled then there's threat of a race condition if some other code specifically requests USB processing (i.e. to unblock stdio), while a scheduled TinyUSB callback is already running on another thread. Relies on the change in the parent commit, where scheduler is restricted to main thread if GIL is disabled. Fixes #15390 - "TinyUSB callback can't recurse" exceptions on rp2 when using _thread module and USB serial I/O. Adds a unit test for stdin functioning correctly in threads (fails on rp2 port without this fix). This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'lib/tinytest/tinytest.c')
0 files changed, 0 insertions, 0 deletions