> 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

-- 
storm mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/storm

Reply via email to