From 26ae7bebdd11a40c4c0b4d7cc56a9e52e2718956 Mon Sep 17 00:00:00 2001 From: mgaertner Date: Tue, 11 Aug 2009 18:12:13 +0000 Subject: [PATCH] multithreadprocs: fixed healper thread waiting for new work git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@929 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/multithreadprocs/mtprocs.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/multithreadprocs/mtprocs.pas b/components/multithreadprocs/mtprocs.pas index 225014b6b..af657df28 100644 --- a/components/multithreadprocs/mtprocs.pas +++ b/components/multithreadprocs/mtprocs.pas @@ -311,12 +311,12 @@ var ok: Boolean; E: Exception; begin - Group:=Item.Group; - aPool:=Group.Pool; + aPool:=Item.Group.Pool; ok:=false; try repeat // work + Group:=Item.Group; Group.Run(Item.Index,Group.TaskData,Item); aPool.EnterPoolCriticalSection; @@ -352,7 +352,7 @@ begin // wait for new work if Item.FState=mtptsInactive then RTLeventWaitFor(Item.fWaitForPool); - until Group=nil; + until Item.Group=nil; ok:=true; except // stop the exception and store it