minor: var toggle
Vladimir Bauer
3 years ago
| 71 | 71 | // context. It's not possible to reuse instance after (*Progress).Wait |
| 72 | 72 | // method has been called. |
| 73 | 73 | func NewWithContext(ctx context.Context, options ...ContainerOption) *Progress { |
| 74 | ctx, cancel := context.WithCancel(ctx) | |
| 75 | 74 | s := &pState{ |
| 76 | 75 | rr: prr, |
| 77 | 76 | bHeap: priorityQueue{}, |
| 94 | 93 | s.shutdownNotifier = make(chan struct{}) |
| 95 | 94 | } |
| 96 | 95 | |
| 96 | ctx, cancel := context.WithCancel(ctx) | |
| 97 | 97 | p := &Progress{ |
| 98 | 98 | ctx: ctx, |
| 99 | 99 | uwg: s.uwg, |