Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActorPool ¶
type ActorPool struct {
// contains filtered or unexported fields
}
ActorPool implements thread-pool like behavior in the actor system. It is given a function to handle tasks, and will call this function with each task submitted to the actor pool.
func NewActorPool ¶
func NewActorPool( system *actor.System, queueLimit uint, workersLimit uint, name string, taskHandler func(actorId uint64, task interface{}, ctx *actor.Context) interface{}, callback func(result interface{}), ) ActorPool
NewActorPool initializes a new actor pool and starts its manager actor.
func (*ActorPool) SubmitTask ¶
SubmitTask is a convenience function for sending a task to the actor pool's manager actor.
type QueueFullError ¶
type QueueFullError struct{}
QueueFullError is returned by SubmitTask when the pool is so backed up that the queue is full.
func (QueueFullError) Error ¶
func (e QueueFullError) Error() string
Click to show internal directories.
Click to hide internal directories.