patch up multiprocessing until it's API can be changed too

This commit is contained in:
Benjamin Peterson 2008-08-18 18:31:58 +00:00
parent d810626f99
commit 82aa201022
4 changed files with 17 additions and 11 deletions

View file

@ -619,11 +619,17 @@ class _TestCondition(BaseTestCase):
woken = self.Semaphore(0)
p = self.Process(target=self.f, args=(cond, sleeping, woken))
p.set_daemon(True)
try:
p.set_daemon(True)
except AttributeError:
p.daemon = True
p.start()
p = threading.Thread(target=self.f, args=(cond, sleeping, woken))
p.set_daemon(True)
try:
p.set_daemon(True)
except AttributeError:
p.daemon = True
p.start()
# wait for both children to start sleeping