|
From: Geoffrey T. <gta...@na...> - 2003-03-05 22:53:21
|
Jason Hildebrand [mailto:ja...@pe...] wrote: <snip> > Note: I need to tweak the Webware source to check for the lock and use > it if available. We can do this already, so that the code will take > advantage of the lock when running on newer Python versions. Would it also help for current versions of Python to use our own import lock around __import__ if the Python import lock isn't available? A workaround might be to pre-import your servlets using explicit import statements in your context's __init__.py. I think the __init__.py gets imported before it fires up the thread pool, so there would be no risk of concurrent imports. In my testing, I often have multiple simultaneous requests come in for the same servlet immediately after restarting the appserver, but I've never encountered a problem with simultaneous imports. I suppose whether or not it's a problem depends on what the side effects of the imports are. - Geoff |