Main thread cannot be cancelled (note that the predicate thread_cancel/1 is not yet operacional).

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1768 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
pmoura 2007-01-02 11:10:58 +00:00
parent ca2723e71f
commit 9d3618393f

View File

@ -247,7 +247,9 @@ thread_join(Id, Status) :-
'$erase_thread_info'(Id0),
'$thread_destroy'(Id0).
thread_cancel(Id) :-
(Id == main; Id == 0), !,
'$do_error'(permission_error(cancel, thread, main), thread_cancel(Id)).
thread_cancel(Id) :-
'$check_thread_or_alias'(Id, thread_cancel(Id)),
'$thread_id_alias'(Id0, Id),