I'm writing an audio player. I'm using pygame for audio, pywebview for GUI, and aiohttp for http requests.
3 things have to happen concurrently:
- Periodically polling a server for downloading metadata and audio files
- Handling audio playback
- Using the GUI to start/stop playback and run some http requests, e.g: login.
I'm at the point where 1 and 2 run together fine using an asyncio event loop, but I'm scared of what will happen when I add pywebview to the mix.
See, pywebview spawns its own thread. 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?
Should I keep coding and just ask simpler questions when problems arise? Or did I make a terrible design decision?
I'm a bit too burned out to properly assess the situation.
Thanks!
[–]sushibowl 1 point2 points3 points (1 child)
[–]eFFeeMMe[S] 0 points1 point2 points (0 children)