> import threading
> t = threading.currentThread()
> Then you can get and set arbitrary attributes on that
> thread to achieve thread-local storage.  So a simple
> implementation of a function that gets a thread-local
> connection could look like this:
> ...

Thanks, that looks quite reasonable and simple. As discussed in another posting, you could also add code that detects bad connections and automatically restarts them; or connections that are too old or have been reused too much.

Do you think it would make sense to provide something like this as a mix-in class for the WebKit Servlet or Page class?

-- Christoph


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Webware-devel mailing list
Webware-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to