Threads -- play well with others? If not, what instead?

Courageous jkraska1 at san.rr.com
Tue Jun 13 00:51:38 EDT 2000


> Yes. Use event based programming. Tcl has support for fileevents -- events
> that get called when a file is ready to read from.

In the unix environment, this translates to select on a file
descriptor block, where activity on any of the file descriptors
(which includes pipes, sockets, and files) results in activation
of the thread, which otherwise goes to sleep until there is
something to do, ensuring that the application does not eat
cpu time. Certainly, there is similar functionality on windows,
probably implemented in a similarly general way.



C/



More information about the Python-list mailing list