Christoph Zwerschke wrote:
>  > 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?

That's one approach.  On the other hand, there is nothing servlet-specific
about the code I posted, so I think a standalone module would be better.  It
could then be used by scheduled tasks running in a worker thread, for
example.

- Geoff


-------------------------------------------------------
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