TaskBase Base executeable task that implements Task interface, embedded into other channel based task runners
| 19 | // TaskBase Base executeable task that implements Task interface, embedded |
| 20 | // into other channel based task runners |
| 21 | type TaskBase struct { |
| 22 | sync.Mutex |
| 23 | Ctx *plan.Context |
| 24 | Name string |
| 25 | Handler MessageHandler |
| 26 | depth int |
| 27 | setup bool |
| 28 | closed bool |
| 29 | hasquit bool |
| 30 | msgInCh MessageChan |
| 31 | msgOutCh MessageChan |
| 32 | errCh ErrChan |
| 33 | sigCh SigChan // notify of quit/stop |
| 34 | errors []error |
| 35 | } |
| 36 | |
| 37 | func NewTaskBase(ctx *plan.Context) *TaskBase { |
| 38 | if ctx.Context == nil { |
nothing calls this directly
no outgoing calls
no test coverage detected