The difference between `sync` and` await` in netty

What is the difference between sync and await methods in netty? Both block the current thread?

thanks

+7
netty
source share
1 answer

I feel that I do not agree, the documents are poorly written. They exist, but you must read the API. However, if you feel like some kind of document is missing, Netty likes contributions, -)

So, for your question: the difference is really sync() will fail if this future does not work, while await() will not (and if you need an exception, you need to request it for a future object using cause() .

See API:

http://netty.io/4.1/api/io/netty/channel/ChannelFuture.html#sync ()

+8
source share

All Articles