[Tutor] Tkinter threads
Dennis Lee Bieber
wlfraed at ix.netcom.com
Tue Mar 8 18:59:12 EST 2022
On Wed, 9 Mar 2022 10:17:26 +1100, Phil <phillor9 at gmail.com> declaimed the
following:
>
>My game of life project is written for wxpython rather than tkinter. I
>use wxpython's time event to do the cell generation calculations which
>is intense enough to cause my old laptop to run hot fairly quickly and
>the GUI to become sluggish. I use the GUI to select different seed
>patterns and adjust the speed of cell generation while it's running.
>
The compute thread likely would call wxPython's .callAfter() [which
queues an event for the main app to process -- probably a function to
update the grid] when it has computed a complete state update (and should
probably then wait on a Queue or other synchronization method, which the
main app would signal when it had consumed [displayed] the current state
data, before starting to compute the next grid pattern).
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed at ix.netcom.com http://wlfraed.microdiversity.freeddns.org/
More information about the Tutor
mailing list