From 0e2402b27e5f7d38ef878bafb3309a0a9f2d1070 Mon Sep 17 00:00:00 2001 From: Paulo Moura Date: Thu, 10 Oct 2013 11:44:52 +0100 Subject: [PATCH] Fix message_queue_property/2 to accept integers as valid queue indentifiers --- pl/threads.yap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pl/threads.yap b/pl/threads.yap index ec7bdffad..774c7c20f 100644 --- a/pl/threads.yap +++ b/pl/threads.yap @@ -690,6 +690,7 @@ message_queue_property(Id, Prop) :- var(Term), !, '$do_error'(instantiation_error, Goal). '$check_message_queue_or_alias'(Term, Goal) :- + \+ integer(Term), \+ atom(Term), Term \= '$message_queue'(_), !, '$do_error'(domain_error(queue_or_alias, Term), Goal). @@ -697,7 +698,6 @@ message_queue_property(Id, Prop) :- \+ recorded('$queue', q(_,_,_,I,_), _), !, '$do_error'(existence_error(queue, '$message_queue'(I)), Goal). '$check_message_queue_or_alias'(Term, Goal) :- - atom(Term), \+ recorded('$queue', q(Term,_,_,_,_), _), !, '$do_error'(existence_error(queue, Term), Goal). '$check_message_queue_or_alias'(_, _).