tkinter, threads and asyncore together

Peter Hansen peter at engcorp.com
Fri Mar 19 03:32:52 CET 2004


duane voth wrote:

>>#to control asyncore
>>while 1:
>>    asyncore.loop(.1)
>>    if not fromgui.empty():
>>        #handle messages from GUI
> 
> 
> The above doesn't work for me - asyncore.loop(<anything>) always blocks.

 From the asyncore docs:

    loop( [timeout[, use_poll[, map]]])

    Enter a polling loop that only terminates after all open channels
    have been closed.

Seems to me that the behaviour is as expected.

-Peter



More information about the Python-list mailing list