Closed ccnlui closed 2 years ago
They are two implementations, eventloop is the old one while reactor is the new one, eventloop consists of symmetric workers while reactor is composed of asymmetric workers: one main reactor and multiple sub reactors.
What is your question about gnet? My question came after reading the following in
engine.go
:What are the functional difference between an event loop and a reactor? They seem very similar because both of them opens a number of
*netpoll.Poller
, creates new event loops, register them to the load balancer, etc...I can tell the option
ReusePort
would create event loops instead of reactor, maybe a better question is when would you want to use theReusePort
option?Thank you.