From 921fb1c815a99c36838a34d9f5cb1d8e3c4cce9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Fri, 11 Mar 2011 20:36:00 +0000 Subject: [PATCH] thread_create should ignore bad options, not complain. --- pl/threads.yap | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pl/threads.yap b/pl/threads.yap index f773ee97c..0f90adc38 100644 --- a/pl/threads.yap +++ b/pl/threads.yap @@ -193,8 +193,9 @@ thread_create(Goal, Id, Options) :- ( Detached \== true, Detached \== false -> '$do_error'(domain_error(thread_option,Detached+[true,false]),G0) ; true ). '$thread_option'(at_exit(AtExit), _, _, _, _, _, AtExit, M, G0) :- !, ( \+ callable(AtExit) -> '$do_error'(type_error(callable,AtExit),G0) ; true ). -'$thread_option'(Option, _, _, _, _, _, _, _, G0) :- - '$do_error'(domain_error(thread_option,Option),G0). +% succeed silently, like SWI. +'$thread_option'(Option, _, _, _, _, _, _, _, G0). +% '$do_error'(domain_error(thread_option,Option),G0). '$record_alias_info'(_, Alias) :- var(Alias), !.