Fixed bug in the predicate thread_create/1 when the thread goal generates an exception.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2204 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
282ba60852
commit
04682ef5f0
@ -83,7 +83,7 @@ thread_create(Goal) :-
|
||||
->
|
||||
true
|
||||
;
|
||||
recorda('$thread_exit_status', [Id|exception(error(resource_error(memory),thread_create(Goal,Id)))],_)
|
||||
recorda('$thread_exit_status', [Id|exception(error(resource_error(memory),thread_create(Goal)))],_)
|
||||
).
|
||||
|
||||
thread_create(Goal, Id) :-
|
||||
@ -350,7 +350,7 @@ thread_exit(Term) :-
|
||||
|
||||
'$run_at_thread_exit'(Id0) :-
|
||||
recorded('$thread_at_exit',[Id0|AtExit],R), erase(R),
|
||||
catch(once(AtExit),_,fail),
|
||||
catch(once(AtExit), _, fail),
|
||||
fail.
|
||||
'$run_at_thread_exit'(Id0) :-
|
||||
recorded('$thread_exit_hook',[Id0|Hook],R), erase(R),
|
||||
|
Reference in New Issue
Block a user