<br><br><div class="gmail_quote">On Sun, Apr 22, 2012 at 9:49 PM, Doug Lea <span dir="ltr"><<a href="mailto:dl@cs.oswego.edu">dl@cs.oswego.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 04/22/12 11:18, Aleksey Shipilev wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sorry, but I fail to see the connection between FutureTask/ForkJoinTask<br>
and proposed FutureValue. In my perspective you should not be able to<br>
submit FutureValue anywhere, this is just the efficient shortcut for<br>
asynchronously-settable value.<br>
</blockquote>
<br></div>
Yes. I was commenting on adding operations like onResult, etc<br>
that invite usages requiring them be submittable to Executors.</blockquote><div><br></div><div>Why would onResult/onException callbacks involve Executors?</div><div>Also, with defender methods you can simply have them throw an UOE.</div>
<div><br></div><div>Since j.u.c sort of sets the interop standard with regards to different languages of the jvm, it would be nice to offer interop that doesn't require sending worker threads to sleep.</div><div><br></div>
<div>Cheers,</div><div>√</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
However, there are cases when I need to communicate single value between<br>
two threads, with one thread blocked for the result. This is the case<br>
where FutureValue comes handy. The cases like these are not as rare as<br>
one might expect. :(<br>
<br>
</blockquote>
<br></div>
Yes, I agree that this is (only) the functionality to target.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
P.S. I'm not allowed to look into Guava source code, but I will bet<br>
their SettableFuture is done directly on AQS (it's the only sane option<br>
at hand).<br>
<br>
</blockquote>
<br></div>
(It is.)<span class="HOEnZb"><font color="#888888"><br>
<br>
-Doug</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
Concurrency-interest mailing list<br>
<a href="mailto:Concurrency-interest@cs.oswego.edu" target="_blank">Concurrency-interest@cs.<u></u>oswego.edu</a><br>
<a href="http://cs.oswego.edu/mailman/listinfo/concurrency-interest" target="_blank">http://cs.oswego.edu/mailman/<u></u>listinfo/concurrency-interest</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Times;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="font-family:arial;font-size:small"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px">Viktor Klang<br>
<br>Akka Tech Lead</span><div><font face="arial, sans-serif"><span style="border-collapse:collapse"><a href="http://www.typesafe.com/" target="_blank">Typesafe</a><span> </span>- </span></font><span>The software stack for applications that scale</span><br>
<font face="arial, sans-serif"><span style="border-collapse:collapse"><br></span></font><font face="arial, sans-serif"><span style="border-collapse:collapse">Twitter: @viktorklang</span></font></div></span></span><br>