Skip to content

Commit

Permalink
Eliminate race condition in creating pickle dir, resolves #453
Browse files Browse the repository at this point in the history
  • Loading branch information
davidemms committed Sep 29, 2020
1 parent 40fb6ec commit 497d143
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts_of/__main__.py
Expand Up @@ -1330,6 +1330,7 @@ def DoOrthogroups(options, speciesInfoObj, seqsInfo):
blastDir_list = files.FileHandler.GetBlastResultsDir()
for iSpecies in range(seqsInfo.nSpecies):
cmd_queue.put((seqsInfo, blastDir_list, Lengths, iSpecies))
files.FileHandler.GetPickleDir() # create the pickle directory before the parallel processing to prevent a race condition
runningProcesses = [mp.Process(target=WaterfallMethod.Worker_ProcessBlastHits, args=(cmd_queue, options.qDoubleBlast)) for i_ in range(options.nProcessAlg)]
for proc in runningProcesses:
proc.start()
Expand Down

0 comments on commit 497d143

Please sign in to comment.