I have added PushInQueue1() and PushInQueue2()
to the Lockfree threadpool. If for example you have two
super fast connection and you want to have more throuput
and minimize contention you will use those two methods
on each worker thread.
Also, i have patched it and added in the destructor
the following:
SetLength(FThreads, 0);
SetLength(Queues, 0);
To free the memory of the dynamic arrays.
Now it is working perfectly and version 1.03 is online now.
Welcome: http://www.colba.net/~aminer/
Thank you for your time.
Regards,
Amine Moulay Ramdane.
I have changed it to:
PushInFirstQueue() and PushInSecondQueue()
That's better.
Regards,
Amine.
And don't forget that it's a Lockfree Threadpool that
use my lockfree_SPMC and work-stealing, so don't
push in the same queue from two different threads.
If you want to push from two threads, use
PushInFirstQueue() in one thread
and
PushInSecondQueue() in the other.
Lock-free Threadpool that use also lockfree_MPMC will come soon.
That's all.
Thank you for your time.
Regards,
Amine.
>
> Regards,
> Amine.
>
>
>
> > to the Lockfree threadpool. If for example you have two
> > super fast connection and you want to have more throuput
> > and minimize contention you will use those two methods
> > on each worker thread.
>
> > Also, i have patched it and added in the destructor
> > the following:
> > SetLength(FThreads, 0);
> > SetLength(Queues, 0);
>
> > To free the memory of the dynamic arrays.
>
> > Now it is working perfectly and version 1.03 is online now.
>
> > Welcome:http://www.colba.net/~aminer/
>
> > Thank you for your time.
>
> > Regards,
> > Amine Moulay Ramdane.- Hide quoted text -
>
> - Show quoted text -
How are you handling the case in which a queue is full/empty? It seems like
your busy-waiting. Unless I am missing something vital, this is a troubling
practice indeed...
Have you given some thought as to how your going to correct this busy
waiting problem? If I am missing something, please correct me as I enjoy
learning new things.