Recent

Author Topic: Threadpool 1.4 and Threadpool with priority 1.3  (Read 2355 times)

aminer

  • Hero Member
  • *****
  • Posts: 956
Threadpool 1.4 and Threadpool with priority 1.3
« on: October 01, 2012, 08:59:02 pm »


Hello,

Threadpool and Threadpool with priiority was updated ,
now the i have added an Exec() method that is scalable,
and i have let the Execute() method that is not scalable.

The interface of the new Exec() method is:

 function Exec(func:TMyProc;const Context: Pointer;var index:long): Boolean;


And don't forget to initialize once the index to 0 before calling
Exec().


You can download them from:

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



Thank you,
Amine Moulay Ramdane.

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: Threadpool 1.4 and Threadpool with priority 1.3
« Reply #1 on: October 01, 2012, 09:09:24 pm »

Hello

If you want to look at more exemples of how to use my threadpool engine, just look at my  parallel quicksort library or my other parallel libraries such parallel compression library and my other
parallel libraries, i have used my threadpool engine to implement all of them.
 
As you will notice, inside the new Exec() of the threadpool enginei have used the same method as with my implementation of the Distributed Reader-Writer Mutex 1.04 and i am using a variable number of mrews to lower the contention more in my implementation of Distributed Reader-Writer Mutex 1.04
based on the Dmitry Vyukov C++ Distributed Reader-Writer Mutex,
and as i said i am using mutiple lockfree FIFO queues inside my threadpool engine, so that there is less contention and using work-stealing also, so after i  have added addedthe exec()
method , this threadpool engine hasl become scalable and this threadpool engine can also
be used as a scalable queue(not a strict FIFO queue, but almost, and it will
be also useful).

This threadpool engine is useful and that is what's important.


Thank you,
Amine Moulay Ramdane.



aminer

  • Hero Member
  • *****
  • Posts: 956
Re: Threadpool 1.4 and Threadpool with priority 1.3
« Reply #2 on: October 03, 2012, 04:56:20 pm »


Hello,

I have updated my Threapool engine, now you have
to initialize the parameter index of the exec() method
to high(long) once before calling exec() so that index
number 0 will be used.


You can download threadpool and threadpool with priority from:

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


Amine Moulay Ramdane.


 

TinyPortal © 2005-2018