Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Lock-free threadpool 1.03 and patch...

2 views
Skip to first unread message

Amine

unread,
Jul 3, 2009, 8:28:10 PM7/3/09
to

Hello,

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.

Amine

unread,
Jul 3, 2009, 9:14:15 PM7/3/09
to
On Jul 3, 8:28 pm, Amine <ami...@colba.net> wrote:
> Hello,
>
> I have added PushInQueue1() and PushInQueue2()


I have changed it to:

PushInFirstQueue() and PushInSecondQueue()

That's better.

Regards,
Amine.

Amine

unread,
Jul 3, 2009, 9:26:11 PM7/3/09
to
On Jul 3, 9:14 pm, Amine <ami...@colba.net> wrote:
> On Jul 3, 8:28 pm, Amine <ami...@colba.net> wrote:
>
> > Hello,
>
> > I have added PushInQueue1() and PushInQueue2()
>
> I have changed it to:
>
> PushInFirstQueue() and PushInSecondQueue()
>
> That's better.

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 -

Chris M. Thomasson

unread,
Jul 28, 2009, 7:04:50 PM7/28/09
to
"Amine" <ami...@colba.net> wrote in message
news:6dff72c7-6d5a-4d29...@o6g2000yqj.googlegroups.com...

>
> Hello,
>
> 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/

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...

Chris M. Thomasson

unread,
Aug 1, 2009, 6:23:03 AM8/1/09
to
"Chris M. Thomasson" <n...@spam.invalid> wrote in message
news:h4o05p$1ouj$1...@news.ett.com.ua...

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.

0 new messages