Skip to content

Commit 5b82fae

Browse files
committed
removed collect_results for efficiency (fixed error)
1 parent b9585c2 commit 5b82fae

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

basicrta/cluster.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,16 @@ def get_taus(self):
9696
"""
9797
from basicrta.util import get_bars
9898

99+
with (Pool(nproc, initializer=tqdm.set_lock,
100+
initargs=(Lock(),)) as p):
101+
try:
102+
for _ in tqdm(p.istarmap(self._single_residue, inarr),
103+
total=len(dirs), position=0,
104+
desc='overall progress'):
105+
pass
106+
except KeyboardInterrupt:
107+
pass
108+
99109
taus = []
100110
for res in tqdm(self.residues, total=len(self.residues)):
101111
taus.append(res.tau)

0 commit comments

Comments
 (0)