From 1acbfc4f80c81b63c6dacdcfa54cb825765c2a7c Mon Sep 17 00:00:00 2001 From: pmoura Date: Thu, 3 Apr 2008 00:02:24 +0000 Subject: [PATCH] Only register at_exit/1 hooks given by the programmer. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2195 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- pl/threads.yap | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pl/threads.yap b/pl/threads.yap index 41a9a06e5..3be006e42 100644 --- a/pl/threads.yap +++ b/pl/threads.yap @@ -193,7 +193,10 @@ thread_create(Goal, OutId, Options) :- '$record_thread_info'(Id, Sizes, Detached, AtExit) :- recorda('$thread_sizes', [Id|Sizes], _), recorda('$thread_detached', [Id|Detached], _), - recorda('$thread_at_exit', [Id|AtExit], _). + ( AtExit == true -> + true + ; recorda('$thread_at_exit', [Id|AtExit], _) + ). % vsc: ????? thread_defaults(Defaults) :-