What is the difference between the sync
and await
methods on netty? Both block the current thread?
Thank you
I feel like I disagree, the docs are not poorly written. They exists, but you nee to read the API. However if you feel some doc are missing, Netty loves contributions ;-)
So for your question: The difference is indeed sync()
will rethrow the failure if this future failed, while await()
will not (and if you need the exception, you need to ask for it to the future objet using cause()
method.
See API:
http://netty.io/4.1/api/io/netty/channel/ChannelFuture.html#sync()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With