Replies: 3 comments 5 replies
-
|
AFAIR, I never got the asyncio.create_task working as I expected. What did work for me was my answer to my question May it help you. Another approach, that I didn't try yet, may work, too: |
Beta Was this translation helpful? Give feedback.
-
|
I tried this with the ListView widget, and it seems like the item from the Here is the full code: @willmcgugan do you have any idea if this should work, or should I use a different approach for non-asyncio aware APIs? |
Beta Was this translation helpful? Give feedback.
-
|
Based on the last comment, here is the full working code if someone else needs threading support for none asynchronous API. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
I'm trying to wrap a blocking API inside a textual GUI, and having problems communicating updates from the to_thread() to the application loop.
I've included the code below, but mainly it's the
self.update_count()call frombcc_ringbuffer_task(), which, if I understand async correctly, runs from a different thread and is not updating the main event loop. I might be wrong here, as I'm a noob with async operations.If it's called from
action_togle_dark()it works fine. Anyone any idea what I'm doing wrong, and how to make this work?Thanks,
Eelco
Beta Was this translation helpful? Give feedback.
All reactions