- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for blockQueue (0.07 sec)
-
staging/src/k8s.io/apimachinery/pkg/watch/mux.go
// The purpose of this terrible hack is so that watchers added after an event // won't ever see that event, and will always see any event after they are // added. func (m *Broadcaster) blockQueue(f func()) { m.incomingBlock.Lock() defer m.incomingBlock.Unlock() select { case <-m.stopped: return default: } var wg sync.WaitGroup wg.Add(1) m.incoming <- Event{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 16 15:26:36 UTC 2022 - 9.4K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/watch/mux_test.go
// 1. Close watcher stopchannel, so watchers are closed independently of the // eventBroadcaster // 2. Shutdown the m.incoming slightly Before m.stopped so that the watcher's // call of Blockqueue can pass the m.stopped check. m.blockQueue(func() { close(stopCh) close(m.incoming) time.Sleep(1 * time.Millisecond) close(m.stopped) }) m.distributing.Wait()
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 16 15:26:25 UTC 2022 - 8K bytes - Viewed (0)