[concurrency-interest] Is there a ConcurrentBlockingQueue ??

Hanson Char hanson.char at gmail.com
Tue Mar 20 19:30:39 EDT 2007


No hassle at all.  Thanks for the scrutiny!

Hanson Char

On 3/20/07, Gregg Wonderly <gregg at cytetech.com> wrote:
>
>
> Hanson Char wrote:
> > Hi Gregg,
> >
> >> It seems like parkq should always be emptied
> >
> >
> > I think I see what you mean.  Yes there is a chance that some unparked
> > items are left over in parkq, if an item is placed to q after a
> > ThreadMarker is placed to parkq but before the thread (of the
> > associated ThreadMarker) is parked.  In such case, the left-over
> > ThreadMarker's would have "parked" set to false.
> >
> > The logic in the offer method attempts to minimize the left-over in
> > parkq by removing all consecutive ThreadMarker with "parked" set to
> > false.
>
> duh...  I missed that looping logic associated with "parked".  I was thinking it
> returned no matter what.  It looks to me like that should take care of the left
> behind "unparked" marker entries.
>
> Sorry for the hassle.
>
> Gregg Wonderly
>


More information about the Concurrency-interest mailing list