Multi threading could be an answer, but Tk is not thread safe.
Tk isn't "thread-safe", but it does run perfectly safely in a single thread.
That is, you can have as many background threads running as you need in your TK app, provided that none of those other threads attempt to talk directly to the GUI.
The basic method is that you start all your background threads runnung before you require Tk and build your GUI. And you then use Thread::Queue(s) to send commands from the GUI to the worker threads and another to receive back results. It is a simple, efficient mechanism that avoids all the fuss and bother of buffered pipes or sockets and select loops.
In reply to Re^3: bidirectional pipe freezing
by BrowserUk
in thread bidirectional pipe freezing
by chessgui
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |