in reply to Tk and blocking loops
When such polling is not possible, you can use fileevent, but I might think twice about trying to handle the data every time it triggers a callback. Better just to enqueue it and get out. Then use a repeat callback to recognize, dequeue, and process the data at a controllable rate. That way you won't be trying to process every individual byte as it comes in at the risk of slowing GUI response to a crawl.
|
|---|