Provides a way to send this WorkerItem a message from an Actor by way of WorkerCommand.Message.
Provides a way to send this WorkerItem a message from an Actor by way of WorkerCommand.Message.
The message that was sent
The sender who sent the message
Called when the item is bound to a worker.
Called when the item is bound to a worker.
Called when the item has been unbound from a worker
Called when the item has been unbound from a worker
A WorkerItem is anything that can be bound to worker to receive both events and external messages. WorkerItems are expected to be single-threaded and non-blocking. Once a WorkerItem is bound to a worker, all of its methods are executed in the event-loop thread of the bound worker.
Note - WorkerItems currently do not automatically bind to a worker on construction. This is because a worker does the binding itself for server connections immediately on construction. Clients need to bind themselves, except when created through the BindAndCreateWorkerItem message. Maybe this should change.
Note - WorkerItem cannot simply just always generate its own context, since in some cases we want one WorkerItem to replace another, in which case the context must be transferred