A couple of weeks ago, I posted a message titled "thread safe SMTP
module" on python-list. It's oddly split in the archive:
http://mail.python.org/pipermail/python-list/2007-March/429067.html
http://mail.python.org/pipermail/python-list/2007-March/429172.html
A while ago, I wrote an address validation function using smtplib.SMTP
for use in a a threaded application. In practice, I found that the
application locked up rather frequently. I scratched my head for a
while before concluding that the caveat mentioned in the thread module's
documentation, noting that some built-in functions may block all
threads, was probably at fault. I then subclassed smtplib.SMTP and
replaced all of the blocking I/O operations with nonblocking ones, and
the function began working properly.
After some discussion, Aahz suggested that I discuss the problem here,
on python-dev. He seemed to think that the problem I saw may have been
an indication of a bug in python. Could anyone take a look at that
thread and say whether it looks like a bug, or working with non-blocking
sockets was the right thing to do?
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com