Module dharma::event_loop
[−]
[src]
Implementation of main thread loop with notification listening.
EventLoop
organizes work flow of a single thread. Independent logical parts of application
called Module
s can be freely added to given EventLoop
s creating flexible multi-threading
framework. EventLoop
contains one receiver which can be used to push events and data to event
queue.
Module
s are created inside new thread so do not have to implement Send. User passes only
their constructors to EventLoopInfo
structure which is context for creation on EventLoop
.
If EventLoop
is not enough or too much, one can make new loop by implementing Service
trait.
Structs
EventLoop |
Thread loop with event queue with communication over |
EventLoopInfo |
Context for creation of |
ServiceInfo |
Context for creation of |
Traits
Module |
|
ModuleConstructor |
To avoid requirement for |
Service |
Trait for all |
ServiceConstructor |
To avoid requirement for |