[concurrency-interest] Fork and and timed get

Vitaly Davidovich vitalyd at gmail.com
Wed Nov 27 20:41:20 EST 2013


What is managed blocking?

Sent from my phone
On Nov 27, 2013 3:16 PM, "√iktor Ҡlang" <viktor.klang at gmail.com> wrote:

>
>
>
> 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
>>> contract.
>>>
>>>
>> 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()
>>> method
>>> 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
>>> to
>>> 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?
>
> Cheers,
>>
>
>>
>>
>> -Doug
>>
>>
>> _______________________________________________
>> Concurrency-interest mailing list
>> Concurrency-interest at cs.oswego.edu
>> http://cs.oswego.edu/mailman/listinfo/concurrency-interest
>>
>
>
>
> --
> Cheers,
>>
> * Viktor Klang*
> *Director of Engineering*
> Typesafe <http://www.typesafe.com/>
>
> Twitter: @viktorklang
>
> _______________________________________________
> 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/20131127/acc3c285/attachment.html>


More information about the Concurrency-interest mailing list