For what it's worth, something I noticed under (the Win32 version of) Python 2.1.x is that, in a threaded environment, Python will crash if it an attempt to load some extensions (my case was a c-extension that accessed a database). I suspect that's why Chris is asking those questions. In particular, I noticed that while this will crash: # AstroMathTest.py # # Tests AstroMath against Python threads import threading import AstroMath import random BODIES = [2,3,4,6,7,8,9,10] START_JD = 2448976 N = 1000 class AstroMathTest(threading.Thread): def run(self): body = random.choice(BODIES) end_jd = random.randrange(START_JD + 1, START_JD + 100) results = AstroMath.makeQVsop(START_JD, end_jd, N, body) print "Period: %s - %s\nBody: %s\nN: %s" % (START_JD, end_jd, body, N) print "Results: %s" % str(results) if __name__ == '__main__': threads = [] for i in range(3): thread = AstroMathTest() thread.start() threads.append(thread) # wait for completion for thread in threads: thread.join() print "All threads completed" ... whereas this will run successfully: # AstroMathTest-2.py # # Tests AstroMath against Python threads import threading import random BODIES = [2,3,4,6,7,8,9,10] START_JD = 2448976 N = 1000 class AstroMathTest(threading.Thread): def run(self): import AstroMath body = random.choice(BODIES) end_jd = random.randrange(START_JD + 1, START_JD + 100) results = AstroMath.makeQVsop(START_JD, end_jd, N, body) print "Period: %s - %s\nBody: %s\nN: %s" % (START_JD, end_jd, body, N) print "Results: %s" % str(results) if __name__ == '__main__': threads = [] for i in range(3): thread = AstroMathTest() thread.start() threads.append(thread) # wait for completion for thread in threads: thread.join() print "All threads completed" .. just by changing where the import statement lies. Is there some way to translate this to how we should write with Zope external methods in mind? ---------- Keith J. Farmer kfarmer@thuban.org http://www.thuban.org -----Original Message----- From: Chris McDonough [mailto:chrism@zope.com] Sent: Monday, January 28, 2002 15:19 exercising no codepaths that might kick off a relational database request or exercise another C extenision?