public final class EmbeddedEventLoop : EventLoop

An EventLoop that is embedded in the current running context with no external control.

Unlike more complex EventLoops, such as SelectableEventLoop, the EmbeddedEventLoop has no proper eventing mechanism. Instead, reads and writes are fully controlled by the entity that instantiates the EmbeddedEventLoop. This property makes EmbeddedEventLoop of limited use for many application purposes, but highly valuable for testing and other kinds of mocking.


Unlike SelectableEventLoop, EmbeddedEventLoop is not thread-safe. This is because it is intended to be run in the thread that instantiated it. Users are responsible for ensuring they never call into the EmbeddedEventLoop in an unsynchronized fashion.