You've already forked lazarus-ccr
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
This commit is contained in:
@@ -311,12 +311,12 @@ var
|
|||||||
ok: Boolean;
|
ok: Boolean;
|
||||||
E: Exception;
|
E: Exception;
|
||||||
begin
|
begin
|
||||||
Group:=Item.Group;
|
aPool:=Item.Group.Pool;
|
||||||
aPool:=Group.Pool;
|
|
||||||
ok:=false;
|
ok:=false;
|
||||||
try
|
try
|
||||||
repeat
|
repeat
|
||||||
// work
|
// work
|
||||||
|
Group:=Item.Group;
|
||||||
Group.Run(Item.Index,Group.TaskData,Item);
|
Group.Run(Item.Index,Group.TaskData,Item);
|
||||||
|
|
||||||
aPool.EnterPoolCriticalSection;
|
aPool.EnterPoolCriticalSection;
|
||||||
@@ -352,7 +352,7 @@ begin
|
|||||||
// wait for new work
|
// wait for new work
|
||||||
if Item.FState=mtptsInactive then
|
if Item.FState=mtptsInactive then
|
||||||
RTLeventWaitFor(Item.fWaitForPool);
|
RTLeventWaitFor(Item.fWaitForPool);
|
||||||
until Group=nil;
|
until Item.Group=nil;
|
||||||
ok:=true;
|
ok:=true;
|
||||||
except
|
except
|
||||||
// stop the exception and store it
|
// stop the exception and store it
|
||||||
|
Reference in New Issue
Block a user