Skip to content

Commit

Permalink
workaround AssertionError <Finalize, dead>
Browse files Browse the repository at this point in the history
  • Loading branch information
rainwoodman committed Nov 18, 2014
1 parent d8d6583 commit 9c517f4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/backends.py
Expand Up @@ -5,7 +5,7 @@
from collections import deque
import traceback
import time

import gc
#logger = multiprocessing.log_to_stderr()
#logger.setLevel(multiprocessing.SUBDEBUG)

Expand Down Expand Up @@ -170,6 +170,11 @@ def start(self):
self.JoinedProcesses.value = 0
self.guardDead.clear()

# collect the garbages before forking so that the left-over
# junk won't throw out assertion errors due to
# wrong pid in multiprocess.heap
gc.collect()

map(lambda x: x.start(), self.P)

# p is alive from the moment start returns.
Expand Down

0 comments on commit 9c517f4

Please sign in to comment.