socket programming strategy

Dennis Reinhardt DennisR at dair.com
Sun Jan 19 00:31:38 CET 2003


> select() calls inside threads, waiting for just one socket.
> Is this plan workable? Or have I missed something?

The downside of blocking sockets is that you need to be able to abort
process externally to exit.  The internal code cannot just set  flag and
expect all threads to exit.

In my case, this is mostly a development issue.  If one thread takes an
exception during development, I do want to exit, modify code, and try again.
In production, if one thread takes an exception, I do not want all other
threads to continue running..

Non-blocking sockets are a development convenience for me, one that I am
doing without because external abort is easy in most cases.
--

Dennis Reinhardt

http://www.dair.com






More information about the Python-list mailing list