Creates the Worker class, specifying a context and the parent Map.
The context to use for hashing.
The method to use to remove a Worker post-event processing.
Holds the context for the Worker.
Method to call when a Worker is to be removed.
Holds the queue of events to work on.
Retrieve the context for the Worker.
The context for the Worker.
Add a new event to the Worker's event queue.
Runs the next worker in the queue, before deleting its entry. Should more entries exist it then runs those.
Generated using TypeDoc
The Worker class is responsible for the execution of scheduling tasks based on events. Each Worker instance is bound to a context. This context could be, for example, a unique Github repository, or a directory in a file system, a specific customer service in a set, etc. It is also generic, and can therefore be of any type. When WorkerEvents are added to an empty queue, they are processed for being worked on in the next tick of event loop.