multithreadprocs: added examples

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@694 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
mgaertner
2009-02-03 08:41:40 +00:00
parent 99043817ca
commit 91b301ae80
8 changed files with 338 additions and 4 deletions

View File

@@ -32,6 +32,7 @@ uses
type
TProcThreadGroup = class;
TProcThreadPool = class;
TProcThread = class;
{ TMultiThreadProcItem }
@@ -48,6 +49,7 @@ type
private
FGroup: TProcThreadGroup;
FIndex: PtrInt;
FThread: TProcThread;
FWaitingForIndexEnd: PtrInt;
FWaitingForIndexStart: PtrInt;
fWaitForPool: PRTLEvent;
@@ -60,6 +62,7 @@ type
property Group: TProcThreadGroup read FGroup;
property WaitingForIndexStart: PtrInt read FWaitingForIndexStart;
property WaitingForIndexEnd: PtrInt read FWaitingForIndexEnd;
property Thread: TProcThread read FThread;
end;
{ TProcThread }
@@ -292,6 +295,7 @@ begin
inherited Create(true);
fItem:=TMultiThreadProcItem.Create;
fItem.fWaitForPool:=RTLEventCreate;
fItem.FThread:=Self;
end;
destructor TProcThread.Destroy;