Recent

Author Topic: Threadpool (merged)  (Read 17755 times)

aminer

  • Hero Member
  • *****
  • Posts: 956
Threadpool (merged)
« on: March 24, 2010, 03:46:02 am »

Hello all,


Description:


Lock-free threadpool.


The following have been added:


-- Lockfree ParallelQueue for less contention and more efficiency or
it can use lockfree_mpmc - flqueue that i have modified, enhanced and
improved... -


- Work-stealing - for more efficiency -


- Enters in a wait state when there no job in the queue, hence, it's
very efficient


Look into define.inc there is many options:


CPU32: for 32 bits architecture
MUTIPLE_PRODUCER: mutiple producer (threads)
ParallelQueue: does use ParallelQueue - very efficient -
Lockfree_MPMC: does use Lockfree_SPMC
ParallelQueueh: does use ParallelQueueh - ParallelQueueh is for
educational purpose -
SINGLE_PRODUCER: for a single producer (thread)


Required switches: -Sd (Delphi mode) for FPC


Please look at the examples test.pas and testpool.pas inside the
zip...


Note: testpool.pas does require Delphi 5+, test.pas works with both
FreePascal and Delphi


You can download Threadpool 1.1 from:


http://pages.videotron.com/aminer/


Language: FPC Pascal v2.2.0+ / Delphi 5+: http://www.freepascal.org/


Operating Systems: Win , Linux and Mac (x86).


Threadpool is *VERY* easy to use, here is an example:


---------------------------------------------------------------------------­--------


program test;


uses
{$IFDEF Delphi}
cmem,
{$ENDIF}
ThreadPool,sysutils,syncobjs;


{$I defines.inc}


type
  TMyThread = class (TThreadPoolThread)
   //procedure ProcessRequest(obj: Pointer); override;


   procedure MyProc1(obj: Pointer);
   procedure MyProc2(obj: Pointer);


     end;


 var
  myobj:TMyThread;
  TP: TThreadPool;
  obj:pointer;
  cs:TCriticalSection;


procedure TMyThread.MyProc1(obj: Pointer);
begin


cs.enter;
writeln('This is MyProc1 with parameter: ',integer(obj));
cs.leave;


end;


procedure TMyThread.MyProc2(obj: Pointer);
begin


cs.enter;
writeln('This is MyProc2 with parameter: ',integer(obj));
cs.leave;


end;


begin


myobj:=TMyThread.create;


cs:=TCriticalSection.create;


TP := TThreadPool.Create(4, 20, TMyThread); // 4 workers threads and
2^20 items for each queue.


obj:=pointer(1);
 TP.execute(myobj.myproc1,pointer(obj));


obj:=pointer(2);
 TP.execute(myobj.myproc2,pointer(obj));


readln;


TP.Terminate;
TP.Free;


end.


---------------------------------------------------------------------------­-


Sincerely,
Amine Moulay Ramdane.



aminer

  • Hero Member
  • *****
  • Posts: 956
Threadpool 1.14 (merged)
« Reply #1 on: March 24, 2010, 03:47:12 am »

Hello all,

Description:


Lock-free threadpool with priority.


The following have been added:


- You can give the following priorities to jobs:


LOW_PRIORITY
NORMAL_PRIORITY
HIGH_PRIORITY


-- Lockfree ParallelQueue for less contention and more efficiency or
it can use lockfree_mpmc - flqueue that i have modified, enhanced and
improved... -


- Work-stealing - for more efficiency -


- Enters in a wait state when there no job in the queue, hence, it's
very efficient


Look into define.inc there is many options:


CPU32: for 32 bits architecture
MUTIPLE_PRODUCER: mutiple producer (threads)
SINGLE_PRODUCER: for a single producer (thread)


Required switches: -Sd (Delphi mode) for FPC


Please look at the examples test.pas and testpool.pas inside the
zip...


Note: testpool.pas does require Delphi 5+, test.pas works with both
FreePascal and Delphi


You can download Threadpool with priority version 1.1 from:


http://pages.videotron.com/aminer/


Language: FPC Pascal v2.2.0+ / Delphi 5+: http://www.freepascal.org/


Operating Systems: Win , Linux and Mac (x86).


Threadpool is *VERY* easy to use, here is an example:


---------------------------------------------------------------------------­--------


program test;


uses
{$IFDEF Delphi}
cmem,
{$ENDIF}
PThreadPool,sysutils,syncobjs;


{$I defines.inc}


type
  TMyThread = class (TPThreadPoolThread)
   //procedure ProcessRequest(obj: Pointer); override;


   procedure MyProc1(obj: Pointer);
   procedure MyProc2(obj: Pointer);


     end;


 var
  myobj:TMyThread;
  TP: TPThreadPool;
  obj:pointer;
  cs:TCriticalSection;


procedure TMyThread.MyProc1(obj: Pointer);
begin


cs.enter;
writeln('This is MyProc1 with parameter: ',integer(obj));
cs.leave;


end;


procedure TMyThread.MyProc2(obj: Pointer);
begin


cs.enter;
writeln('This is MyProc2 with parameter: ',integer(obj));
cs.leave;


end;


begin


myobj:=TMyThread.create;


cs:=TCriticalSection.create;


TP := TPThreadPool.Create(4, 20, TMyThread); // 4 workers threads and
2^20 items for each queue.


obj:=pointer(1);
 TP.execute(myobj.myproc1,pointer(obj),NORMAL_PRIORITY);


obj:=pointer(2);
 TP.execute(myobj.myproc2,pointer(obj),NORMAL_PRIORITY);


readln;


TP.Terminate;
TP.Free;


end.


---------------------------------------------------------------------------­-


Sincerely,
Amine Moulay Ramdane.



aminer

  • Hero Member
  • *****
  • Posts: 956
Re: Threadpool with priority version 1.1 ...
« Reply #2 on: March 24, 2010, 05:09:29 am »

Hello,


II have forgot to tell you that i have added also the
following:

You can now call any method with the excute() method, like this


excute(your method, parameter , priority);


In Object Pascal it looks like  this:

TP.execute(myobj.myproc1,pointer(obj),NORMAL_PRIORITY);

(look inside the zipfile i have included two demos:
test.pas, and ptestpool.pas  - a  Parallel program of Matrix
multiply by a vector that use SSE+ -

Also, as i have promised,   the workers threads now
enters in a wait state when there is no jobs in the queues ,
 - now it doesn't consume the CPU when there is no jobs in the queues -
hence,  it's very efficient


And, as i have promised and as you have noticed, my threadpool
 now use my lockfree ParallelQueue:
at http://pages.videotron.com/aminer/parallelqueue/parallelqueue.htm

for less contention and more efficiency...

etc.



Sincerely
Amine Moulay Ramdane.


aminer

  • Hero Member
  • *****
  • Posts: 956
Threadpool 1.12 ...
« Reply #3 on: March 24, 2010, 09:11:46 am »
Hello,


I have patched Thradpool and to version 1.12..

TPThreadPool.execute look like this - i have used an array
of critical sections, and a local variable 'balance'...to avoid
some problems...


------------------------------------------------------------------------------------------------------------

function TPThreadPool.execute(func:TmyProc;const Context: Pointer;Priority:byte):Boolean;
var
params: MyParam;
balance:integer;
begin
//new(params);
params:=MYParam.create;
params.proc:=func;
params.param:=context;
balance:=LockedInc(balance1);
if (balance=FThreadCount) then
                              begin
                                 LockedSub(balance,balance);
                                 LockedSub(balance1,balance1);
                              end;
                                
cs[balance].enter;                            
 while not Queues[balance].push(TObject(params),priority)  do;
if Queues[balance].count<=1 then events[balance].setevent;
cs[balance].leave;  
end;
-----------------------------------------------------------------------------------------


Threadpool with priority have been updated also to 1.12

You can download Threadpool version 1.12 from:

http://pages.videotron.com/aminer/


Thank you for your time..


Amine Moulay Ramdane.

« Last Edit: March 24, 2010, 11:10:22 pm by Marc »

aminer

  • Hero Member
  • *****
  • Posts: 956
Threadpool 1.14 ...
« Reply #4 on: March 24, 2010, 01:00:07 pm »

Hello all,


I think we don't need an array of critical sections...

You can download the new version 1.14 of both
Threadpool and Threadpool with priority  from:

http://pages.videotron.com/aminer/


I have included a test_thread.pas example
 - with many workers threads ...- .

This patch avoids deadlock...

TPThreadPool.execute() method have changed to...

--------------------------------------------------------------------------------------------------
function TThreadPool.execute(func:TmyProc;const Context: Pointer): Boolean;
var
params: MyParam;
local_balance,local_count:integer;
begin
params:=MYParam.create;
params.proc:=func;
params.param:=context;

local_balance:=LockedIncLong(balance1) mod FThreadCount;
local_count:=Queues[local_balance].count;
while not Queues[local_balance].push(TObject(params))  do;
if local_count=0 then events[local_balance].setevent;
end;

---------------------------------------------------------------------------------------------




Thank you for your time...


Sincerely,
Amine Moulay Ramdane.



aminer

  • Hero Member
  • *****
  • Posts: 956
Re: Threadpool 1.14 ...
« Reply #5 on: March 24, 2010, 01:31:45 pm »
Hello,


Threadpool is very easy to use...

Here is an example with priorities - you can
give  LOW_PRIORITY, NORMAL_PRIORITY
and HIGH_PRIORITY -   look at test_thread.pas
inside the pthreadpool.zip  -  that i have just wrote
for  you, that use many workers threads..

Note: don't forget to give some feedback...

--------------------------------------------------------

program test;

uses

{$IFDEF Delphi}

cmem,

{$ENDIF}

PThreadPool,sysutils,windows,classes,syncobjs;

type

TMyThread = class (TPThreadPoolThread)

//procedure ProcessRequest(obj: Pointer); override;

 

procedure MyProc1(obj: Pointer);

procedure MyProc2(obj: Pointer);

end;

 

 

var hndlArr : Array[0..19] of THandle;

AId:DWORD;

event1,event2:TSimpleEvent;

n:int64;

j:integer;

myobj:TMyThread;

TP: TPThreadPool;

obj:pointer;

cs:TCriticalSection;

number:integer;

 

procedure TMyThread.MyProc1(obj: Pointer);

begin

cs.enter;

inc(number);

if number=8000 then event2.setevent;

//writeln('This is MyProc1 with parameter: ',integer(obj));

cs.leave;

end;

procedure TMyThread.MyProc2(obj: Pointer);

begin

cs.enter;

inc(number);

if number=8000 then event2.setevent;

//writeln('This is MyProc2 with parameter: ',integer(obj));

cs.leave;

end;

function StartFunc1(InVal:pointer):DWORD;

var temp:tobject;

i:integer;

obj:pointer;

begin

event1.waitfor(INFINITE);

for i:=0 to 1999

do

begin

obj:=pointer(i);

TP.execute(myobj.myproc1,obj,NORMAL_PRIORITY);

end;

end;

function StartFunc2(InVal:pointer):DWORD;

var temp:tobject;

i:integer;

obj:pointer;

begin

event1.waitfor(INFINITE);

for i:=0 to 1999

do

begin

obj:=pointer(i);

TP.execute(myobj.myproc1,obj,NORMAL_PRIORITY);

end;

end;

 

function StartFunc3(InVal:pointer):DWORD;

var temp:tobject;

i:integer;

obj:pointer;

begin

event1.waitfor(INFINITE);

for i:=0 to 1999

do

begin

obj:=pointer(i);

TP.execute(myobj.myproc2,pointer(obj),NORMAL_PRIORITY);

end;

end;

 

function StartFunc4(InVal:pointer):DWORD;

var temp:tobject;

i:integer;

obj:pointer;

begin

event1.waitfor(INFINITE);

for i:=0 to 1999

do

begin

obj:=pointer(i);

TP.execute(myobj.myproc2,pointer(obj),NORMAL_PRIORITY);

end;

end;

begin

number:=0;

cs:=TCriticalSection.create;

myobj:=TMyThread.create;

TP := TPThreadPool.Create(4, 20, TMyThread); // 4 workers threads and 2^20 items for each queue.

 

event1:=TSimpleEvent.create;

event2:=TSimpleEvent.create;

hndlArr[0]:=BeginThread(nil,0,@StartFunc1,pointer(1),0,AId);

hndlArr[1]:=BeginThread(nil,0,@StartFunc2,pointer(1),0,AId);

hndlArr[2]:=BeginThread(nil,0,@StartFunc3,pointer(1),0,AId);

hndlArr[3]:=BeginThread(nil,0,@StartFunc4,pointer(1),0,AId);

 

event1.setevent;

WaitForMultipleObjects(4, @hndlArr, True, INFINITE);

event2.waitfor(INFINITE);

writeln('Number is: ',number);

end.

---------------------------------------------------------




Sincerely,
Amine Moulay Ramdane.



hinst

  • Sr. Member
  • ****
  • Posts: 303
Re: Threadpool 1.14 ...
« Reply #6 on: March 24, 2010, 06:23:31 pm »
Im am not sure, if i understood correctly... Does your library allows to use threads without manual synchronization?
Too late to escape fate

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: Threadpool 1.14 ...
« Reply #7 on: March 24, 2010, 06:31:16 pm »

Hello,

No.

http://en.wikipedia.org/wiki/Thread_pool_pattern

It's a Threapool that uses a lockfree MPMC (Multiple producer
multiple consumer) and  have the following advantages:


-- It uses a my Lockfree ParallelQueue for less contention and
more efficiency or it can use lockfree_mpmc - flqueue that i have modified, enhanced and improved... -

http://pages.videotron.com/aminer/parallelqueue/parallelqueue.htm


- Work-stealing - for more efficiency -


- Enters in a wait state when there no job in the queue,
  hence, it's very efficient


- You can now call any method with the execute() method,
like this


execute(your method, parameter);


In Object Pascal it looks like  this:


TP.execute(myobj.myproc1,pointer(obj));


(look inside the zipfile i have included two demos:
test.pas, and ptestpool.pas  - a  Parallel program of Matrix
multiply by a vector that use SSE+ -


Look into defines.inc there is many options:


CPU32: for 32 bits architecture
MUTIPLE_PRODUCER: mutiple producer (threads)
ParallelQueue: does use ParallelQueue - very efficient -
Lockfree_MPMC: does use Lockfree_SPMC
ParallelQueueh: does use ParallelQueueh - ParallelQueueh is for
educational purpose -
SINGLE_PRODUCER: for a single producer (thread)



Sincerely,
Amine Moulay Ramdane.



aminer

  • Hero Member
  • *****
  • Posts: 956
Re: Threadpool 1.14 ...
« Reply #8 on: March 24, 2010, 06:35:40 pm »

Hello again,

With the Threadpool with priority you can give
the following priorities to jobs:

LOW_PRIORITY
NORMAL_PRIORITY
HIGH_PRIORITY


You can now call any method with the execute() method, like this


execute(your method, parameter , priority);


In Object Pascal it looks like this:


TP.execute(myobj.myproc1,pointer(obj),NORMAL_PRIORITY);

(look inside the zipfile i have included two demos:
test.pas,test_thread.pas,  and ptestpool.pas - a Parallel
program of  Matrix multiply by a vector that use SSE+ - )



Sincerely,
Amine Moulay Ramdane.




Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2584
Re: Threadpool 1.14 (merged)
« Reply #9 on: March 24, 2010, 11:15:56 pm »
Please don't make a new topic for every revision you make (on the same day)
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: Threadpool 1.14 (merged)
« Reply #10 on: March 25, 2010, 01:26:44 am »


Hello,


Thank you Mark.

And take care ...



Amine Moulay Ramdane.



aminer

  • Hero Member
  • *****
  • Posts: 956
Threadpool 1.2 (stable version ...) ...
« Reply #11 on: March 26, 2010, 08:03:37 am »

Hello all,


I have updated Threadpool (and threadpool with priority) to version
1.2 - a stable version - i had some - difficult - problems with the
FPC memory manager, so, i have used some tricks to avoid
completly those problems..


Author: Amine Moulay Ramdane

Language: FPC Pascal v2.2.0+ / Delphi 5+: http://www.freepascal.org/

Operating Systems: Win , Linux and Mac (x86).


Description:

Lock-free threadpool.


The following have been added:

-- Lockfree ParallelQueue for less contention and more efficiency
or it can use lockfree_mpmc - flqueue that i have modified, enhanced
and improved... -

-  It uses many queues and work-stealing - for more efficiency -

- Enters in a wait state when there no job in the queue,
  hence, it's very efficient

- You can now call any method with the excute() method, like this

excute(your method, parameter);


In Object Pascal it looks like  this:

TP.execute(myobj.myproc1,pointer(obj));

- look inside the zipfile i have included two demos:
test.pas, and ptestpool.pas  - a  Parallel program of Matrix
multiply by a vector that use SSE+ -


Look into defines.inc there is many options:

CPU32: for 32 bits architecture
MUTIPLE_PRODUCER: mutiple producer (threads)
ParallelQueue: does use ParallelQueue - very efficient -
Lockfree_MPMC: does use Lockfree_MPMC
ParallelQueueh: does use ParallelQueueh - ParallelQueueh is for educational purpose -
SINGLE_PRODUCER: for a single producer (thread)


Required FPC switches:  -Sd  -dFPC -dWin32 -dFreePascal

-Sd for delphi mode....


Required Delphi switches: -DMSWINDOWS -DDelphi   -$H+
 

Please look at the examples test.pas,testpool.pas and test_thread.pas...

Note: testpool.pas does require Delphi 5+, test.pas and test_thread.pas
works with both FreePascal and Delphi

You can download the new and stable version from:

http://pages.videotron.com/aminer/


My Threadpool is VERY easy to use, and here is an example:


-------------------------------------------------------------------------------------------

program test;

uses
{$IFDEF Delphi}
cmem,
{$ENDIF}
ThreadPool,sysutils,windows,classes,syncobjs;

type
  TMyThread = class (TThreadPoolThread)
   //procedure ProcessRequest(obj: Pointer); override;
   
   procedure MyProc1(obj: Pointer);
   procedure MyProc2(obj: Pointer);

     end;



var hndlArr : Array[0..19] of THandle;
AId:DWORD;
event1,event2:TSimpleEvent;
n:int64; 
j:integer;
 myobj:TMyThread;
  TP: TThreadPool;
  obj:pointer;
  cs:TCriticalSection;
 number:integer;


procedure TMyThread.MyProc1(obj: Pointer);
begin

cs.enter;
inc(number);
if number=4000000 then event2.setevent;
writeln(number);
//writeln('This is MyProc1 with parameter: ',integer(obj));
cs.leave;

end;

procedure TMyThread.MyProc2(obj: Pointer);
begin

cs.enter;
inc(number);
if number=4000000 then event2.setevent;
writeln(number);
//writeln('This is MyProc2 with parameter: ',integer(obj));
cs.leave;

end;

function StartFunc1(InVal:pointer):DWORD;
var temp:tobject;
 i:integer;
 obj:pointer;
 func:TMyProc;

 begin
event1.waitfor(INFINITE);

for i:=0 to 999999
 
do
begin
 obj:=pointer(i);
TP.execute(myobj.myproc1,obj);
end;
end;

function StartFunc2(InVal:pointer):DWORD;
var temp:tobject;
 i:integer;
 obj:pointer;
 func:TMyProc;

 begin
event1.waitfor(INFINITE);
for i:=0 to 999999

do
begin
 obj:=pointer(i);
TP.execute(myobj.myproc1,obj);
end;
end;


function StartFunc3(InVal:pointer):DWORD;
var temp:tobject;
 i:integer;
 obj:pointer;
 func:TMyProc;

 begin
event1.waitfor(INFINITE);

for i:=0 to 999999
 
do
begin
  obj:=pointer(i);
TP.execute(myobj.myproc2,obj);
end;
end;


function StartFunc4(InVal:pointer):DWORD;
var temp:tobject;
 i:integer;
 obj:pointer;
 func:TMyproc;
 begin
event1.waitfor(INFINITE);
for i:=0 to 999999
do
begin
 obj:=pointer(i);
TP.execute(myobj.myproc2,obj);
end;
end;

begin
number:=0;
cs:=TCriticalSection.create;
myobj:=TMyThread.create;
TP := TThreadPool.Create(4, 10, TMyThread);
// 4 workers threads and 2^10 items for each queue.


event1:=TSimpleEvent.create;
event2:=TSimpleEvent.create;

hndlArr[0]:=BeginThread(nil,0,@StartFunc1,pointer(1),0,AId);
hndlArr[1]:=BeginThread(nil,0,@StartFunc2,pointer(1),0,AId);
hndlArr[2]:=BeginThread(nil,0,@StartFunc3,pointer(1),0,AId);
hndlArr[3]:=BeginThread(nil,0,@StartFunc4,pointer(1),0,AId);


event1.setevent;
WaitForMultipleObjects(2, @hndlArr, True, INFINITE);
event2.waitfor(INFINITE);
writeln('Number is: ',number);
end.

----------------------------------------------------------------------------------------


Sincerely,
Amine Moulay Ramdane.


aminer

  • Hero Member
  • *****
  • Posts: 956
Thread Pool Engine, and Work-Stealing .....
« Reply #12 on: March 27, 2010, 02:52:18 am »

Hello,


I am still writing the page at:


http://pages.videotron.com/aminer/threadpool.htm


And it starts with something like this:


"On a multicore system, your goal is to spread the work efficiently
among many cores so that it does executes simultaneously. And
performance gain should be directly related to how many cores you
have. So, a quad core system should be able to get the work done
4 times faster than a single core system. A 16-core platform should
be 4-times faster than a quad-core system, and 16-times faster than
a single core...


That's where my Threadpool comes in hand, it spreads the work
efficiently
among many cores.


The following have been added to Threadpool:


Lock-free ParallelQueue for less contention and more efficiency
or it can use lockfree_mpmc - flqueue that i have modified, enhanced
and improved... - See lock-free ParallelQueue:


http://pages.videotron.com/aminer/parallelqueue/parallelqueue.htm


 It  uses many queues and work-stealing - for more efficiency -
The worker threads enters in a wait state when there no job in the
lock-free queues - for more efficiency -


You can distribute your jobs to the worker threads and call any
method with the threadpool's execute() method.


[...]


Work-Stealing scheduling algorithm offer many feature over the
ordinary scheduling algorithm:


Effective:


Using local queues, this will minimize contention.
Load Balancing:


Every thread can steal work from the other threads,
so Work-Stealing provides implicitly Load Balancing.


My Threadpool allows load balancing, and also minimize contention...".


Any Feedback ?


Sincerely,
Amine Moulay Ramdane.



aminer

  • Hero Member
  • *****
  • Posts: 956
Thread Pool Engine version 1.3 - stable version - is here ...
« Reply #13 on: March 27, 2010, 05:25:16 pm »

Hello all,


I have updated Threadpool to version 1.3 - a stable version -

Lock-free ParallelQueuerb and lock-free RingBuffer have been added


Author: Amine Moulay Ramdane


Language: FPC Pascal v2.2.0+ / Delphi 5+:

http://www.freepascal.org/


Operating Systems: Win , Linux and Mac (x86).


Description:


Lock-free Thread Pool Engine.


The following have been added:


-- Lockfree ParallelQueue for less contention and more efficiency
or it can use lockfree_mpmc - flqueue that i have modified, enhanced
and improved... - ...


-  It  uses a lock-free queue for each worker thread and work-stealing
  - for more efficiency -

- The worker threads enters in a wait state when there no job in the
  lock-free queues - for more efficiency -


- You can distribute your jobs to the worker threads and call any
   method with the threadpool's execute() method.


Look into defines.inc there is many options:


ParallelQueue: it uses lock-free ParallelQueue - very efficient -
Lockfree_MPMC: it uses lockfree_MPMC
ParallelQueuerb: it uses lock-free ParallelQueuerb (New)
RingBuffer: it uses lock-free RingBuffer  (New)
SINGLE_PRODUCER: for a single producer (thread)
MUTIPLE_PRODUCER: mutiple producer (threads)
CPU32: for 32 bits architecture



Required FPC switches: -O3 -Sd -dFPC -dWin32 -dFreePascal

-Sd for delphi mode....

Required Delphi switches: -DMSWINDOWS -$H+

For Delphi 5,6,7 use -DDelphi

For Delphi 2005,2006,2007,2009,2010+ use the switch -DDELPHI2005+

Please look at the examples test.pas,test_pool.pas and
test_thread.pas insode the zip...


Note: test_pool.pas does require Delphi 5+, test.pas and
test_thread.pas works with both FreePascal and Delphi


You can download the new and stable version 1.3 from:


http://pages.videotron.com/aminer/


My Threadpool is VERY easy to use, and here is a page
that i wrote about it:

http://pages.videotron.com/aminer/threadpool.htm





Sincerely,
Amine Moulay Ramdane.


aminer

  • Hero Member
  • *****
  • Posts: 956
Re: Threadpool (merged)
« Reply #14 on: March 28, 2010, 06:05:14 pm »

Skybuck Flying wrote:
> I would like to see performance comparisions, against
> Delphi's own TThread and/or other windows methods ?
> [...]
> and why your Thread Pool Engine would be better might also help ;)


And how will you load balance the workload efficiently,
and also minimize contention...
and not start threads for each job...
...
with just TThread ?


Please read again:

 
http://pages.videotron.com/aminer/threadpool.htm


My Threadpool is very efficient and very easy to use...



Take care..


Sincerely
Amine Moulay Ramdane.



 

TinyPortal © 2005-2018