M2Crypto: select() behaves weird on SSL sockets

Steve Holden sholden at holdenweb.com
Mon Jul 1 10:21:08 EDT 2002


"Kragen Sitaker" <kragen at pobox.com> wrote ...

[...Zope discussion...]
>
> I think Irmen was asking, if the data handle_write is going to write
> is generated in another thread, how does it get written to the output
> buffer?  Zope contains FIFOs, which look non-thread-safe to me but
> seem to work, that carry the data between threads.

Thanks for pointing this out. I was probably misinterpreting that part of
the post.

Now that you mention it, the data transfer mechanism between the producer
thread and the asynchronous loop doesn't actually look completely
thread-safe. It might be better to use a Queue rather than the home-rolled
fifo in the code, but that might be a little expensive per-thread. Maybe
asynchat needs a couple of code revisions as well as some documentation ...

regards
-----------------------------------------------------------------------
Steve Holden                                 http://www.holdenweb.com/
Python Web Programming                http://pydish.holdenweb.com/pwp/
-----------------------------------------------------------------------








More information about the Python-list mailing list