(sem *semaphore, gotChan chan struct{})
| 337 | } |
| 338 | |
| 339 | func tryAcquire(sem *semaphore, gotChan chan struct{}) { |
| 340 | go func() { |
| 341 | // blocking until someone puts the token into the semaphore |
| 342 | sem.acquire(context.Background()) |
| 343 | gotChan <- struct{}{} |
| 344 | }() |
| 345 | } |
| 346 | |
| 347 | // requestor is a set of test helpers around breaker testing. |
| 348 | type requestor struct { |
no test coverage detected