in reply to Tk, LWP, and blocking?
There's a couple of different ways to fix this. You could use multiple processes or threads (one GUI-refresher, one HTTP-getter) or you could use an asynchronous approach like POE.
You've timed your question perfectly, because there's a new article out on how to do the latter: Using GUIs (Gtk in this case, but it works for Tk, too) and POE for I/O, all in one process, all smoothly:
The April issue of the German Linux-Magazin features a GUI-driven stock ticker, fetching stock quotes via HTTP. The British "Linux-Magazine" (also available in the US at Barnes & Noble) will print the article in its May issue (update: now available here).
Whichever language you prefer, the listing (at the bottom of the online article) should illustrate the general concept.
|
|---|