Kill terminated specified task.
(id int64)
| 113 | |
| 114 | // Kill terminated specified task. |
| 115 | func (m *Manager) Kill(id int64) { |
| 116 | select { |
| 117 | case m.killCh <- id: |
| 118 | case <-m.ctx.Done(): |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | // Wait waits task for completion or wait timeout. |
| 123 | func (m *Manager) Wait(ctx context.Context, id int64) (err error) { |