Documentation
¶
Overview ¶
WARNING: this package is EXPERIMENTAL and may change in breaking ways
tasks are basically wrappers around go routines that will send exits if the specified action is given.
The process traps exits and will call the [cleanup] function before it exits. this makes it a nice fit for things like [net/http.Server]s that generally block a thread but also can be closed using a pointer.
Index ¶
- func Start(self erl.PID, taskFun func() error, cleanupFun func() error, opts ...StartOpt) (erl.PID, error)
- func StartLink(self erl.PID, taskFun func() error, cleanupFun func() error, opts ...StartOpt) (erl.PID, error)
- func StartMonitor(self erl.PID, taskFun func() error, cleanupFun func() error, opts ...StartOpt) (erl.PID, erl.Ref, error)
- func Stop(task erl.PID) error
- type StartOpt
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartMonitor ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.