Skip to content

Commit

Permalink
use asynchronous function
Browse files Browse the repository at this point in the history
  • Loading branch information
raphenya committed May 7, 2019
1 parent bb84328 commit b2b7d85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/BWT.py
Expand Up @@ -1114,10 +1114,10 @@ def get_summary(self):
for alignment_hit in reads.keys():
jobs.append((alignment_hit, models, variants, baits, reads, models_by_accession,))

# with Pool(processes=self.threads) as p:
# summary = p.map(self.jobs, jobs)
with Pool(processes=self.threads) as p:
results = p.map_async(self.jobs, jobs)
summary = results.get()

summary = list(self.jobs(job) for job in jobs)
logger.info("Time: {}".format( format(time.time() - t0, '.3f')))
# write json
with open(self.allele_mapping_data_json, "w") as af:
Expand Down

0 comments on commit b2b7d85

Please sign in to comment.