Fixed bug in the thread_create/3 predicate where the thread indentifer was not within scope of the at_exit/1 option.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2196 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
1acbfc4f80
commit
f827e047c1
@ -87,7 +87,7 @@ thread_create(Goal) :-
|
||||
recorda('$thread_exit_status', [Id|exception(error(resource_error(memory),thread_create(Goal,Id)))],_)
|
||||
).
|
||||
|
||||
thread_create(Goal, OutId) :-
|
||||
thread_create(Goal, Id) :-
|
||||
G0 = thread_create(Goal, Id),
|
||||
'$check_callable'(Goal, G0),
|
||||
( nonvar(Id) -> '$do_error'(type_error(variable,Id),G0) ; true ),
|
||||
@ -102,10 +102,9 @@ thread_create(Goal, OutId) :-
|
||||
true
|
||||
;
|
||||
recorda('$thread_exit_status', [Id|exception(error(resource_error(memory),thread_create(Goal,Id)))],_)
|
||||
),
|
||||
OutId = Id.
|
||||
).
|
||||
|
||||
thread_create(Goal, OutId, Options) :-
|
||||
thread_create(Goal, Id, Options) :-
|
||||
G0 = thread_create(Goal, Id, Options),
|
||||
'$check_callable'(Goal,G0),
|
||||
( nonvar(Id) -> '$do_error'(type_error(variable,Id),G0) ; true ),
|
||||
@ -123,8 +122,7 @@ thread_create(Goal, OutId, Options) :-
|
||||
true
|
||||
;
|
||||
recorda('$thread_exit_status', [Id|exception(error(resource_error(memory),thread_create(Goal,Id,Options)))],_)
|
||||
),
|
||||
OutId = Id.
|
||||
).
|
||||
|
||||
'$erase_thread_info'(Id) :-
|
||||
recorded('$thread_exit_status', [Id|_], R),
|
||||
|
Reference in New Issue
Block a user