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:
parent
ca2723e71f
commit
9d3618393f
@ -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),
|
||||
|
Reference in New Issue
Block a user