X-Git-Url: https://git.ucc.asn.au/?p=progcomp2013.git;a=blobdiff_plain;f=qchess%2Fsrc%2Ftimeout_player.py;h=1bd53c9ac0657b6b148097dfa38bd1e7d279b8c4;hp=937c94cf00a3e046e59afd93d8b8f0a75eb21255;hb=9b5054e5a06872ae85aca693079c17a0cd40c339;hpb=93279737bf3ad25d9172fa7873bb0cc689a8487a diff --git a/qchess/src/timeout_player.py b/qchess/src/timeout_player.py index 937c94c..1bd53c9 100644 --- a/qchess/src/timeout_player.py +++ b/qchess/src/timeout_player.py @@ -22,8 +22,11 @@ class Worker(multiprocessing.Process): self.q = q def run(self): - #print str(self) + " runs " + str(self.function) + " with args " + str(self.args) + #print str(self) + " runs " + str(self.function) + " with args " + str(self.args) + #try: self.q.put(self.function(*self.args)) + #except IOError: + # pass @@ -44,7 +47,7 @@ def TimeoutFunction(function, args, timeout): w.terminate() s.join() raise Exception("TIMEOUT") - + time.sleep(0.1)