2016-12-05 23:38:32 +00:00
|
|
|
package execution
|
|
|
|
|
|
|
|
type Supervisor struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
type waiter interface {
|
|
|
|
Wait() (uint32, error)
|
|
|
|
}
|
|
|
|
|
2016-12-11 19:07:32 +00:00
|
|
|
func (s *Supervisor) Monitor(w waiter, cb func(uint32, error)) {
|
|
|
|
go cb(w.Wait())
|
2016-12-05 23:38:32 +00:00
|
|
|
}
|