[Zope-dev] Problem with starting thread in the initialization of a product ( Linux)

Lily Li lli@kaval.com
Wed, 22 Aug 2001 14:31:37 -0400


Hi friends,

I've encountered a serious problem when trying to port my product from win32
system to Linux. 

As we need several threads running as long as zope is up running, we started
the thread (tried both daemon one and non-daemon one) in the initialization
of the product like (in __init__.py):
  
	import threading

	def initialize(context):
                 .........
                 .........
                  t = threading.Thread()
                  t.setDaemon(1)
                  t.start()

Then zope will stop responding to any HTTP request. If the thread is not
started, the zope will run correctly. Does anyone has the similar experience
with it? It seems that the problem is caused by starting thread when
initializing. I did threading thing before but started by HTTP request and
it worked fine. Besides, this code works fine on win32 systems. 

If anyone could give me any help as soon as possible, it's highly
appreciated. 

Lily Li