[concurrency-interest] Fork and and timed get
viktor.klang at gmail.com
Wed Nov 27 15:03:35 EST 2013
On Wed, Nov 27, 2013 at 11:01 AM, Doug Lea <dl at cs.oswego.edu> wrote:
> On 11/27/2013 11:09 AM, Romain Colle wrote:
> The basic idea here is that, as far as I can tell, the get(long timeout,
>> TimeUnit unit) method of a ForkJoinTask does not respect the Future
> Well, it does meet spec in that it times out no earlier than required.
> Before blocking and waiting for the task to complete, the timed get()
>> tries to either steal and execute the task, or at least help it complete.
>> If it succeeds doing so, it will for instance execute the task that it is
>> waiting for. And in this case, there is no telling how long it will take
>> execute it ...
> Yes. Given the documentation of FJ, people ought to expect this
> and would claim it to be a bug if it did otherwise. Maybe we
> should add better method documentation for timed get, and also
> explain a few ways to get non-participatory timeouts.
> For example, creating a new thread to perform the invocation
> and timing out on Thread.join. Suggestions welcome.
Have ``get`` use managed blocking? Is that an option?
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
*Director of Engineering*
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest