You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The use of asynchio is becoming increasingly common. To those using it, it would be helpful if your generator had an option to enable it. The generator could import the library and add decorations and so forth. The default for the option should be to not use asyncio.
The text was updated successfully, but these errors were encountered:
Asynchronous programming is a nice thing, but implementing it with GUI frameworks isn't that easy, since both the GUI framework and asyncio uses it's own event loop, that will block each other. This could be solved by using threading, but the thing is, Tkinter isn't thread-safe.
So you have to keep Tkinter in the main thread, and start asyncio in another thread. From the asyncio thread you have to make thread-safe callbacks via call_soon_threadsafe to Tkinter, so it won't raise errors like main loop is not in the main thread or calling tcl from s different department.
For more information I really recommend the asyncio section on this page: http://tkdocs.com/tutorial/eventloop.html (actually the whole page is really useful, if you want to understand Tkinter and Tk).
The use of asynchio is becoming increasingly common. To those using it, it would be helpful if your generator had an option to enable it. The generator could import the library and add decorations and so forth. The default for the option should be to not use asyncio.
The text was updated successfully, but these errors were encountered: