Add thread_create/2 predicate (same as thread_create/3 using default options).
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1651 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
c5e3e3f528
commit
4f6d13e8c0
@ -50,6 +50,14 @@
|
||||
recorda('$thread_exit_status', [Id0|exception(Exception)], _),
|
||||
'$run_at_thread_exit'(Id0).
|
||||
|
||||
thread_create(Goal, Id) :-
|
||||
'$check_callable'(Goal, thread_create(Goal, Id)),
|
||||
recorded('$thread_defaults', [Stack, Trail, System], _),
|
||||
'$thread_new_tid'(Id),
|
||||
'$clean_db_on_id'(Id),
|
||||
'$create_mq'(Id),
|
||||
'$create_thread'(Goal, Stack, Trail, System, _, Id).
|
||||
|
||||
thread_create(Goal, Id, Options) :-
|
||||
G0 = thread_create(Goal, Id, Options),
|
||||
'$check_callable'(Goal,G0),
|
||||
|
Reference in New Issue
Block a user