From: Christoph Z. <ci...@on...> - 2005-07-26 18:57:14
|
> 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 |