Moving CompletionHandler to java.util.concurrent

Gili cowwoc at bbs.darktech.org
Thu Oct 22 09:57:52 PDT 2009



Alan Bateman wrote:
> 
> Gili wrote:
>> You know what Alan? The more I take a look at
>> http://guava-libraries.googlecode.com/svn/trunk/javadoc/com/google/common/util/concurrent/ListenableFuture.html
>> the more it doesn't make sense to introduce CompletionHandler in Java7.
>> Instead of introducing duplicate methods (one that uses Futures, another
>> that uses CompletionHandler) we should just have a single method that
>> handles both use-cases using a ListenableFuture.
>>
>> Have you guys reviewed this possibility already...?
>>   
> Yes, this ground has been well covered. If you go back a few years to 
> AIO4J, you'll see that it had an API that is close to what you are 
> suggesting now.
> 

Okay, so why did the team decide against this approach? What problems are
associated with it?


Alan Bateman wrote:
> 
> If you really need this then you can 
> wrap the channels and use the completion handlers to drive the framework.
> 

I don't understand what you mean here. How can one wrap a channel to achieve
the behavior I'm asking for?

Thanks,
Gili
-- 
View this message in context: http://n2.nabble.com/Moving-CompletionHandler-to-java-util-concurrent-tp3845440p3873582.html
Sent from the nio-discuss mailing list archive at Nabble.com.


More information about the nio-discuss mailing list