(ctx context.Context)
| 91 | } |
| 92 | |
| 93 | func (s *sequenceAllocator) Stop(ctx context.Context) { |
| 94 | |
| 95 | // Trigger stop and release of unused sequences |
| 96 | close(s.terminator) |
| 97 | s.releaseUnusedSequences(ctx) |
| 98 | } |
| 99 | |
| 100 | // Release sequence monitor runs in its own goroutine, and releases allocated sequences |
| 101 | // that aren't used within 'releaseSequenceTimeout'. |