From 38cb5d5c0606481cbc34bd1a1187264d1fc1b085 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sat, 14 Mar 2015 18:28:02 +0300 Subject: Threading: Sleep while waiting --- wqflask/wqflask/my_pylmm/pyLMM/kinship.py | 1 + 1 file changed, 1 insertion(+) diff --git a/wqflask/wqflask/my_pylmm/pyLMM/kinship.py b/wqflask/wqflask/my_pylmm/pyLMM/kinship.py index 1383c782..9ab48510 100644 --- a/wqflask/wqflask/my_pylmm/pyLMM/kinship.py +++ b/wqflask/wqflask/my_pylmm/pyLMM/kinship.py @@ -119,6 +119,7 @@ def kinship(G,options): results.append(p.apply_async(compute_matrixMult, (job,W))) # Do we have a result? while (len(results)-completed>cpu_num*2): + time.sleep(0.1) try: j,x = q.get_nowait() if options.verbose: sys.stderr.write("Job "+str(j)+" finished\n") -- cgit v1.2.3