# HG changeset patch # User samer # Date 1345711738 -3600 # Node ID 02d99048fb78b086ce48705658c0061182a733a9 # Parent 24236c9c07b68fc77a2c6d30aff46f6c1c3f2cc1 Adapted to latest thread_get_message diff -r 24236c9c07b6 -r 02d99048fb78 qutils.pl --- a/qutils.pl Wed Feb 29 20:30:31 2012 +0000 +++ b/qutils.pl Thu Aug 23 09:48:58 2012 +0100 @@ -33,12 +33,17 @@ %:- writeln('% compiling get_message_or_timeout/2 using deadline/1 option.'). get_message_or_timeout(Deadline,Msg) :- - ( get_time(Now), Now thread_self(Thread), - thread_get_message(Thread,Msg,[deadline(Deadline)]), - debug(qutils,'got message: ~w.',[Msg]) - ; Msg=timeout - ). + thread_self(Thread), + ( thread_get_message(Thread,Msg,[deadline(Deadline)]) + -> debug(qutils,'got message: ~w.',[Msg]) + ; Msg=timeout). + + % ( get_time(Now), Now thread_self(Thread), + % thread_get_message(Thread,Msg,[deadline(Deadline)]), + % debug(qutils,'got message: ~w.',[Msg]) + % ; Msg=timeout + % ). :- else.