Method
handleWait
(ctx context.Context, handle *taskHandle, ch chan *drivers.ExitResult)
Source from the content-addressed store, hash-verified
| 685 | } |
| 686 | |
| 687 | func (d *Driver) handleWait(ctx context.Context, handle *taskHandle, ch chan *drivers.ExitResult) { |
| 688 | defer close(ch) |
| 689 | |
| 690 | select { |
| 691 | case <-ctx.Done(): |
| 692 | return |
| 693 | case <-d.ctx.Done(): |
| 694 | return |
| 695 | case <-handle.ctx.Done(): |
| 696 | ch <- handle.GetExitResult() |
| 697 | } |
| 698 | } |
| 699 | |
| 700 | // StopTask will not be called if the task has already exited (e.g. onError). |
| 701 | func (d *Driver) StopTask(taskID string, timeout time.Duration, signal string) error { |
Tested by
no test coverage detected