[concurrency-interest] JCJP Memoizer pattern

Tim Peierls tim at peierls.net
Tue Mar 30 10:53:45 EDT 2010


MapMaker.makeComputingMap in Google Collections might also be appropriate
here.

--tim

On Tue, Mar 30, 2010 at 7:45 AM, Bryan Thompson <bryan at systap.com> wrote:

> Hello,
>
> We've been using the "Memoizer" pattern from JCIP and run into a problem
> where an interrupt of the thread actually running the Computable is
> essentially propagated to all tasks awaiting the same Computable.  This was
> easy enough to fix by adding a flag indicating whether the thread awaiting
> the Future was the thread which actually ran the task.  If so, then we
> propagate the interrupt.  Otherwise we remove the FutureTask from the cache
> and retry, essentially discarding the interrupt for other callers.
>
> Bryan
>
> _______________________________________________
> 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/20100330/37b8f7c4/attachment.html>


More information about the Concurrency-interest mailing list