[storm] Pylons and Storm
Drew Smathers
drew.smathers at gmail.com
Fri Aug 10 16:20:46 BST 2007
> I`m implement middleware for use storm in wsgi enabled apps.
> Look my code http://snippets.dzone.com/posts/show/4408
There's bug in your thread cleanup:
for thread in filter(lambda x:x not in enumerate(), self.connections.keys()):
del(self.connections[thread])
Also, this seems expensive to have to scan over your connections each
time you lease a connection. I would suggest looking at
storm.zope.zstorm.ZStorm as an example of how you can use
threading.local to effectively lease a connection per thread without
using locks directly or scanning over your connections with each
request.
--
\\\\\/\"/\\\\\\\\\\\
\\\\/ // //\/\\\\\\\
\\\/ \\// /\ \/\\\\
\\/ /\/ / /\/ /\ \\\
\/ / /\/ /\ /\\\ \\
/ /\\\ /\\\ \\\\\/\
\/\\\\\/\\\\\/\\\\\\
d.p.s
More information about the storm
mailing list