Subject: Re: [SWIPL] current_thread/2 behavior

From: Jan Wielemaker <[email-masked]>
Date: Tue, 13 Nov 2001 13:49:59 +0100

> %% 1)
> 
> ?- current_thread(asd,X).
> ERROR: thread `asd' does not exist
> 
> ?-catch(current_thread(asd,X),Error,true).
> 
> X = _G378 Error = error(existence_error(thread, asd), _G457)
> 
> Yes
> 
> %% 2)
> 
> ?- current_thread(A,X),A=asd.
> 
> No
> 
> %% Question : Why ?

I guess you want to say it is more in line with the other current_*
predicates to fail silently if the argument is of the right type, but
the object simply doesn't exist.

I changed the behaviour accordingly.  Changes (affecting only pl-thread.c)
are in the CVS repository.

	Regards --- Jan