The following methods implement context.Context for TaskLoop Done returns a channel that's closed when the task loop has been stopped.
()
| 98 | |
| 99 | // Done returns a channel that's closed when the task loop has been stopped. |
| 100 | func (l *Loop) Done() <-chan struct{} { |
| 101 | return l.done |
| 102 | } |
| 103 | |
| 104 | // Err returns nil if the task loop is still running. |
| 105 | // Otherwise it return errClosed if the loop has been closed/stopped. |