Python with Apache 2.0
Robert Brewer
fumanchu at amor.org
Fri Nov 19 11:42:21 EST 2004
Chang LI wrote:
> Does python support threads safely along with Apache 2.0 in
> web applications.
The only problem I found using Apache2 (on Windows 2k) was that Apache
uses a thread pool, so if you add attributes to a thread, they won't be
freed when the request ends. For example,
"threading.currentThread().data = 5"; you might encounter that same
thread again later, and it will already have .data == 5 at the beginning
of your request handler. As long as you're not adding attributes to
thread objects, or using a mapping of thread id's, you should be OK.
Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org
More information about the Python-list
mailing list