netty thread model confuse

51 views
Skip to first unread message

jonef...@gmail.com

unread,
Jan 17, 2017, 3:16:06 AM1/17/17
to Netty discussions
when using EventLoop, why do we need to check  if we are in event loop ?  isn't  the  calling thread is the worker thread dedicated for that channel and that event loop , whoever it will be ? 

Norman Maurer

unread,
Jan 17, 2017, 3:16:50 AM1/17/17
to ne...@googlegroups.com
Its needed as you user could call for example Channel.write(…) from the application thread which may be different then the EventLoop.

On 4 Jan 2017, at 10:59, jonef...@gmail.com wrote:

when using EventLoop, why do we need to check  if we are in event loop ?  isn't  the  calling thread is the worker thread dedicated for that channel and that event loop , whoever it will be ? 

--
You received this message because you are subscribed to the Google Groups "Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netty+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netty/0d4d0714-1aa1-4f97-843c-45690581dd61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages