X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=qchess%2Fsrc%2Ftimeout_player.py;h=937c94cf00a3e046e59afd93d8b8f0a75eb21255;hb=8571bc0c18f4a42bd1c8f34a5a36bcd9678b3f14;hp=36f9e204a90587cbdb4e20c71ae65da30e7e20a6;hpb=444244d5c7698bb7861cdb7c0ec6bfb0e8cebfb7;p=progcomp2013.git diff --git a/qchess/src/timeout_player.py b/qchess/src/timeout_player.py index 36f9e20..937c94c 100644 --- a/qchess/src/timeout_player.py +++ b/qchess/src/timeout_player.py @@ -3,6 +3,7 @@ import multiprocessing # Hacky alternative to using select for timing out players # WARNING: Do not wrap around HumanPlayer or things breakify +# WARNING: Do not use in general or things breakify class Sleeper(multiprocessing.Process): def __init__(self, timeout): @@ -42,7 +43,7 @@ def TimeoutFunction(function, args, timeout): elif not s.is_alive(): w.terminate() s.join() - raise Exception("UNRESPONSIVE") + raise Exception("TIMEOUT")