netty/netty — pull request #1371 by normanmaurer (2013-05-17 04:58:14+00:00)
Title: Allow to use VoidPromise for flush(...), write(...) and sendFile(...)

At the moment a new ChannelPromise is created for every flush(...), write(...) and sendFile(...) operation. This can keep the GC quite busy if you write fast enough. Often the user don't care about the returned ChannelFuture and so may would like to not create a new one and so not put so much pressure on the GC.

With this pull-req it's possible to use a VoidChannelPromise and pass it to the stated operations. This will not work for all ChannelHandlers as those which depend on for example on adding ChannelFutureListener to the promise during processing will not work anymore. This is not a problem as it will throw an IllegalStateException in this case. This is more of an advanced feature so I think we should not have to much concern here.

The VoidChannelPromise can be accessed with
```java
channel.unsafe().voidPromise();
```

This change produce a bit of API breakage but only for Transport implementations so I think it should not affect 99% of our users and so is ok.

This fixes #1317