Hello,
As i have promised, my Scalable MPMC FIFO priority Queue version 1.0
is here.
Author: Amine Moulay Ramdane
Language: FPC Pascal v2.2.0+ / Delphi 5+:
http://www.freepascal.org/Operating Systems: Win , Linux and Mac (x86).
Description:
A Scalable MPMC FIFO priority Queue.
The following have been added:
- You can give the following priorities to jobs:
LOW_PRIORITY
NORMAL_PRIORITY
HIGH_PRIORITY
- A queue for each worker thread and it uses work-stealing - for more efficiency -
- Enters in a wait state when there no is job in the queue - for more efficiency -
- Uses O(1) complexity on enqueue and O(3) complexity worst case on dequeue.
Look into defines.inc there is many options:
CPU32: for 32 bits architecture
CPU64: for 64 bits architecture
Please read an article that i wrote about my Threadpool engine: article.
Look test.pas and at test1.pas examples inside the zip file that shows you that my PQueue is scaling.
You can download PQueue version 1.0 from:
http://pages.videotron.com/aminer/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+
Thank you,
Amine Moulay Ramdane.