Multi-threaded SSL

cowbertvonmoo at gmail.com cowbertvonmoo at gmail.com
Sat Feb 18 02:37:22 EST 2006


Thanks Alex.  I hadn't noticed that example.  I gave it a shot and
still have the synchronization problems.  While this may be because of
a lack of understanding of twisted threads (again, perhaps I'm just not
looking in the right places, but even the the API reference is sparse
of explanation), I strongly suspect that there's something going on at
a lower level, like the Open SSL wrapper or Open SSL on the system
level.  At this point, I'd just like to know if I should cut my losses
and try a very rapid polling solution (*cringes*).  Here are my
attempts:

Twisted SSL Foray:
http://cixar.com/svn/mage/twisted_ssl_foray.py
http://cixar.com/websvn/filedetails.php?repname=Cixar&path=%2Fmage%2Ftwisted_ssl_foray.py&rev=0&sc=0

Bare SSL Foray:
http://cixar.com/svn/mage/bare_ssl_foray.py
http://cixar.com/websvn/filedetails.php?repname=Cixar&path=%2Fmage%2Fbare_ssl_foray.py&rev=0&sc=0

In the twisted example, I'm logging before and after I start sleeping
in the process request section to note whether the pages are being
processed in parallel.  They aren't.  My log message order for two
asynchronous page requests should look like:

start (first)
start (second)
stop (first)
stop (second)

But I'm rather getting:

start (first)
stop (first)
start (second)
stop (second)

Again, grateful for your help,
Kris Kowal.




More information about the Python-list mailing list