From: aminer on

Hello,


I have been working all the night on the following problem:

'Sometimes' the producer threads of my Threadpool was hanging ,
and i have finally discovered what is the problem...

In the push() method inside lockfree_mpmc.pas you will see that
it is using a repeat until , this tight loop around the CAS
was not working properly and was hanging the producer threads
from time to time, and the solution to this problem was to
add a sleep(0) in this tight loop.

Now Threadpool is working perfectly , and is perfectly stable
- i have tested it all the night ! - .


Please download all my modules that contains lockfree_mpmc.pas
- like ParrallelQueue, Threadpool, Pthreadpool , Parallel
compression ,
Parallel Quicksort etc. -

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



Amine Moulay Ramadne



From: aminer on

Hello again,

I have retested my ParallelQueue algorithm , it's perfectly stable
and it is scoring the same in my benchmarks on an Intel Core
2 Quad Q6600:

17 millions of pop() transactions per second !

and

3.4 millions of push() transactions per second !


And i am using ParallelQueue inside my Thread Pool Engine.

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



Sincerely,
Amine Moulay Ramdane.





On Apr 21, 6:54 am, aminer <ami...(a)videotron.ca> wrote:
> Hello,
>
> I have been working all the night on the following  problem:
>
> 'Sometimes'  the producer threads of my Threadpool was hanging  ,
> and i have finally discovered what is the problem...
>
> In the push() method inside lockfree_mpmc.pas you will see that
>  it is using a repeat until   , this tight loop around the CAS
> was not working properly and was hanging the producer threads
> from time to time,  and the solution to this problem was to
> add a sleep(0) in this tight loop.
>
> Now Threadpool is working perfectly , and is perfectly stable
> - i have tested it all the night ! - .
>
> Please download all my modules that contains lockfree_mpmc.pas
> - like ParrallelQueue, Threadpool, Pthreadpool , Parallel
> compression ,
> Parallel Quicksort etc. -
>
> Welcome:http://pages.videotron.com/aminer/
>
> Amine Moulay Ramadne

 | 
Pages: 1
Prev: file conversions
Next: on goto