Corrected a bug in setting a thread exit status in case the thread goal results in an exception; exit status should be exception(Exception) and not exception(error(Exception,_)).
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2269 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
6a2843f4e3
commit
502a5571a8
@ -62,7 +62,7 @@
|
|||||||
% format(user_error,'closing thread ~w~n',[v([Id0|Status])]).
|
% format(user_error,'closing thread ~w~n',[v([Id0|Status])]).
|
||||||
'$close_thread'(Exception, Detached, Id0) :-
|
'$close_thread'(Exception, Detached, Id0) :-
|
||||||
( recorded('$thread_exit_status', [Id0|_], R), erase(R), fail
|
( recorded('$thread_exit_status', [Id0|_], R), erase(R), fail
|
||||||
; recorda('$thread_exit_status', [Id0|exception(error(Exception,_))], _)
|
; recorda('$thread_exit_status', [Id0|exception(Exception))], _)
|
||||||
),
|
),
|
||||||
'$run_at_thread_exit'(Id0),
|
'$run_at_thread_exit'(Id0),
|
||||||
( Detached == true ->
|
( Detached == true ->
|
||||||
@ -83,7 +83,7 @@ thread_create(Goal) :-
|
|||||||
->
|
->
|
||||||
true
|
true
|
||||||
;
|
;
|
||||||
recorda('$thread_exit_status', [Id|exception(error(resource_error(memory),thread_create(Goal)))],_)
|
recorda('$thread_exit_status', [Id|exception(resource_error(memory)))],_)
|
||||||
).
|
).
|
||||||
|
|
||||||
thread_create(Goal, Id) :-
|
thread_create(Goal, Id) :-
|
||||||
@ -100,7 +100,7 @@ thread_create(Goal, Id) :-
|
|||||||
->
|
->
|
||||||
true
|
true
|
||||||
;
|
;
|
||||||
recorda('$thread_exit_status', [Id|exception(error(resource_error(memory),thread_create(Goal,Id)))],_)
|
recorda('$thread_exit_status', [Id|exception(resource_error(memory)))],_)
|
||||||
).
|
).
|
||||||
|
|
||||||
thread_create(Goal, Id, Options) :-
|
thread_create(Goal, Id, Options) :-
|
||||||
@ -120,7 +120,7 @@ thread_create(Goal, Id, Options) :-
|
|||||||
->
|
->
|
||||||
true
|
true
|
||||||
;
|
;
|
||||||
recorda('$thread_exit_status', [Id|exception(error(resource_error(memory),thread_create(Goal,Id,Options)))],_)
|
recorda('$thread_exit_status', [Id|exception(resource_error(memory)))],_)
|
||||||
).
|
).
|
||||||
|
|
||||||
'$erase_thread_info'(Id) :-
|
'$erase_thread_info'(Id) :-
|
||||||
|
Reference in New Issue
Block a user