[concurrency-interest] Hash key based thread pool

raghuram nidagal raghuram.nidagal at gmail.com
Sat Feb 13 11:18:35 EST 2010


thanks..that is similar to the use case that i was thinking about..

On Sat, Feb 13, 2010 at 4:03 PM, Colin Fleming
<colin.mailinglist at gmail.com>wrote:

> We've used this approach, it worked well for us. We needed to
> distribute work but ensure that jobs were ordered for a particular
> entity, so we used an array of single threaded executors as Peter
> describes.
>
> Cheers,
> Colin
>
>  On 13 February 2010 04:21, raghuram nidagal <raghuram.nidagal at gmail.com>
> wrote:
> > thats right..i was more curious to know if this approach is used and if
> > people have had any experiences with this approach compared to some other
> > techniques
> >
> > On Sat, Feb 13, 2010 at 8:36 AM, Peter Veentjer <alarmnummer at gmail.com>
> > wrote:
> >>
> >> You can always use an array of single threaded threadpools and use a
> >> entity.hashcode % array.length to find the correct threadpool in the
> array
> >>
> >>
> >>
> >> On 13 feb 2010, at 03:38, raghuram nidagal <raghuram.nidagal at gmail.com>
> >> wrote:
> >>
> >>> Hi,
> >>> I wanted to know if anyone has used hashing to allocate jobs to a
> thread
> >>> pool. I see this being useful in systems like processing stocks etc
> where
> >>> instead of locking on the entity we can queue jobs for the same entity
> into
> >>> one thread and avoid synchronizing on the entity.
> >>> Thanks
> >>> Raghu
> >>> _______________________________________________
> >>> Concurrency-interest mailing list
> >>> Concurrency-interest at cs.oswego.edu
> >>> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
> >
> >
> > _______________________________________________
> > Concurrency-interest mailing list
> > Concurrency-interest at cs.oswego.edu
> > http://cs.oswego.edu/mailman/listinfo/concurrency-interest
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20100213/6edc9929/attachment.html>


More information about the Concurrency-interest mailing list