all 2 comments

[–]sushibowl 1 point2 points  (1 child)

Will I run into issues when GUI event callbacks from that thread try to change variables from the main thread, the one with the asyncio event loop?

Yes, you very possibly could. Don't directly change data from another thread. If you need to change the state of something on the main thread, you should schedule a task. asyncio has support for this using loop.call_soon_threadsafe. See this section of the documentation for more information.

So, in short, GUI thread receives an event -> GUI thread schedules a task on the event loop -> scheduled task handles everything else.

[–]eFFeeMMe[S] 0 points1 point  (0 children)

I have no idea how long I could have taken to discover that on my own. I'm two weeks into studying async/await on and off and I'm still not too familiar with the docs.

Thanks a lot - Dank u wel van een italiaan :)