Bright ideas sought: detecting uasyncio #11560
peterhinch
started this conversation in
Ideas
Replies: 1 comment
-
I reckon we should fix this in uasyncio. See #11562 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I raised this as an issue #11530 but I figured that not everyone sees these.
I'm after a function which can detect whether a piece of synchronous code was called from synchronous code or from a task. This is my best effort:
It works, but as the issue reports,
uasyncio
retains state. If I run an application which usesuasyncio
, then at the REPL, run code which uses that function, it will returnTrue
regardless of the facts.Can anyone think of a non-hacky workround?
Beta Was this translation helpful? Give feedback.
All reactions