fix thread_dettach

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2168 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2008-03-26 14:51:41 +00:00
parent f933b890f0
commit bee5cd8c0b
1 changed files with 10 additions and 1 deletions

View File

@ -286,7 +286,16 @@ thread_cancel(Id) :-
thread_detach(Id) :-
'$check_thread_or_alias'(Id, thread_detach(Id)),
'$thread_id_alias'(Id0, Id),
'$detach_thread'(Id0).
(
recorded('$thread_detached', [Id0|_], R),
erase(R),
fail
;
recordz('$thread_detached', [Id0|true], _),
fail
;
'$detach_thread'(Id0)
).
thread_exit(Term) :-
var(Term), !,