uasyncio run_in_executor support #10413
-
Hi, is there a way to mimic the asyncio.run_in_executor of CPython in uasyncio? If you have a long blocking call and have no asynchronous support for that call, it would be nice to run it in a thread using the asyncio.run_in_executor while the rest of the code can be executed in the event_loop. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
I have written this doc which aims to describe using In particular this section details code for dealing with blocking functions. |
Beta Was this translation helpful? Give feedback.
-
Hello I've had the same problem with a neopixel strip. It was difficult but with the help of @peterhinch (thanks again to him) I succeeded.
It's a test program I force the variable (*var) and the wait values are put for testing they must be adapted.
Thierry. |
Beta Was this translation helpful? Give feedback.
I have written this doc which aims to describe using
uasyncio
with code running in other contexts including threaded code and code running on another core (RP2).In particular this section details code for dealing with blocking functions.