Moving CompletionHandler to java.util.concurrent

View: New views
5 Messages — Rating Filter:   Alert me  

Moving CompletionHandler to java.util.concurrent

by cowwoc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Hi,

I would like to propose moving CompletionHandler to package java.util.concurrent. Its use is not limited to I/O operations. For example, I use it for monitoring asynchronous Swing operations. CompletionHandler can
be used virtually anywhere that java.util.concurrent.Future can, so why not place them in the same package?

Orginal post: http://n2.nabble.com/Moving-CompletionHandler-to-java-util-concurrent-tt3845440.html#a3848449

Thanks,
Gili

Re: Moving CompletionHandler to java.util.concurrent

by Sam Berlin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There seem to be many inventions designed to workaround the fact that Futures don't have a listening mechanism.  CompletionHandler is one mechanism to asynchronously listen to the completion of a Future.  Google recently open-sourced their "guava" library which adds methods for listening to a Future.  There was a long discussion a while ago about different folks implementing their own listeners to Future.

IMO, I'd rather really & truly add listeners to Future.  But CompletionHandler is nice too.

Sam

On Mon, Oct 19, 2009 at 3:26 PM, cowwoc <cowwoc@...> wrote:

Hi,

Hi,

I would like to propose moving CompletionHandler to package
java.util.concurrent. Its use is not limited to I/O operations. For example,
I use it for monitoring asynchronous Swing operations. CompletionHandler can
be used virtually anywhere that java.util.concurrent.Future can, so why not
place them in the same package?

Orginal post:
http://n2.nabble.com/Moving-CompletionHandler-to-java-util-concurrent-tt3845440.html#a3848449

Thanks,
Gili
--
View this message in context: http://www.nabble.com/Moving-CompletionHandler-to-java.util.concurrent-tp25958440p25958440.html
Sent from the JSR166 Concurrency mailing list archive at Nabble.com.

_______________________________________________
Concurrency-interest mailing list
Concurrency-interest@...
http://cs.oswego.edu/mailman/listinfo/concurrency-interest


_______________________________________________
Concurrency-interest mailing list
Concurrency-interest@...
http://cs.oswego.edu/mailman/listinfo/concurrency-interest

Re: Moving CompletionHandler to java.util.concurrent

by Joe Bowbeer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You are referring to the proposed java.nio.channels.CompletionHandler?

http://openjdk.java.net/projects/nio/javadoc/java/nio/channels/CompletionHandler.html

Joe

On Mon, Oct 19, 2009 at 12:26 PM, cowwoc wrote:

Hi,

Hi,

I would like to propose moving CompletionHandler to package
java.util.concurrent. Its use is not limited to I/O operations. For example,
I use it for monitoring asynchronous Swing operations. CompletionHandler can
be used virtually anywhere that java.util.concurrent.Future can, so why not
place them in the same package?

Orginal post:
http://n2.nabble.com/Moving-CompletionHandler-to-java-util-concurrent-tt3845440.html#a3848449

Thanks,
Gili
--

_______________________________________________
Concurrency-interest mailing list
Concurrency-interest@...
http://cs.oswego.edu/mailman/listinfo/concurrency-interest

Re: Moving CompletionHandler to java.util.concurrent

by cowwoc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, I am.

Gili

Joe Bowbeer wrote:
You are referring to the proposed java.nio.channels.CompletionHandler?

http://openjdk.java.net/projects/nio/javadoc/java/nio/channels/CompletionHandler.html

Joe

On Mon, Oct 19, 2009 at 12:26 PM, cowwoc wrote:

>
> Hi,
>
> Hi,
>
> I would like to propose moving CompletionHandler to package
> java.util.concurrent. Its use is not limited to I/O operations. For
> example,
> I use it for monitoring asynchronous Swing operations. CompletionHandler
> can
> be used virtually anywhere that java.util.concurrent.Future can, so why not
> place them in the same package?
>
> Orginal post:
>
> http://n2.nabble.com/Moving-CompletionHandler-to-java-util-concurrent-tt3845440.html#a3848449
>
> Thanks,
> Gili
> --
>

_______________________________________________
Concurrency-interest mailing list
Concurrency-interest@cs.oswego.edu
http://cs.oswego.edu/mailman/listinfo/concurrency-interest

Re: Moving CompletionHandler to java.util.concurrent

by karlthepagan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As much as CompletionService and CompletionHandler are complimentary it would be nice to see APIs that incorporate both of the implementation patterns that they promote. I am doing this with the next rework of my MessageFuture lib.


_______________________________________________
Concurrency-interest mailing list
Concurrency-interest@...
http://cs.oswego.edu/mailman/listinfo/concurrency-interest