From eac625e0ecc04f50e5fe6507ab984915797fab0d Mon Sep 17 00:00:00 2001 From: pmoura Date: Sat, 23 Feb 2008 11:31:13 +0000 Subject: [PATCH] Fixed a bug in the predicate threads/0 where some threads might not be listed if there are gaps between the identifiers of the existing threads (e.g. with threads 0, 1, 3 the thread 3 would not be listed). git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2112 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- pl/threads.yap | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pl/threads.yap b/pl/threads.yap index 62857957c..2279ca33b 100644 --- a/pl/threads.yap +++ b/pl/threads.yap @@ -801,9 +801,10 @@ threads :- write('------------------------------------------------------------------------'), nl, format("~t~a~48+~n", 'Thread Detached Status'), write('------------------------------------------------------------------------'), nl, - thread_property(Thread, detached(Detached)), - thread_property(Thread, status(Status)), - '$thread_id_alias'(Thread, Alias), + recorded('$thread_sizes', [Id| _], _), + recorded('$thread_detached', [Id| Detached], _), + '$thread_property'(Id, status(Status)), + '$thread_id_alias'(Id, Alias), format("~t~q~30+~33|~w~42|~q~n", [Alias, Detached, Status]), fail. threads :-