- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 311 for waiters (0.15 sec)
-
src/runtime/testdata/testprognet/waiters.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 1.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sync/semaphore/semaphore.go
s.mu.Unlock() } func (s *Weighted) notifyWaiters() { for { next := s.waiters.Front() if next == nil { break // No more waiters blocked. } w := next.Value.(waiter) if s.size-s.cur < w.n { // Not enough tokens for the next waiter. We could keep going (to try to // find a waiter with a smaller request), but under load that could cause
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 4.3K bytes - Viewed (0) -
src/internal/poll/fd_mutex.go
// 1 bit - lock for read operations. // 1 bit - lock for write operations. // 20 bits - total number of references (read+write+misc). // 20 bits - number of outstanding read waiters. // 20 bits - number of outstanding write waiters. const ( mutexClosed = 1 << 0 mutexRLock = 1 << 1 mutexWLock = 1 << 2 mutexRef = 1 << 3 mutexRefMask = (1<<20 - 1) << 3 mutexRWait = 1 << 23
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 20 16:55:30 UTC 2018 - 6.4K bytes - Viewed (0) -
src/runtime/sema.go
s.next.parent = s } // Add t first in s's wait list. s.waitlink = t s.waittail = t.waittail if s.waittail == nil { s.waittail = t } s.waiters = t.waiters if s.waiters+1 != 0 { s.waiters++ } t.parent = nil t.prev = nil t.next = nil t.waittail = nil } else { // Add s to end of t's wait list. if t.waittail == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 19K bytes - Viewed (0) -
src/runtime/sema_test.go
// // Specifically enqueue all the waiters for the first lock, // then all the waiters for the second lock. // // Then, dequeue all the waiters from the first lock, then // the second. // // Each enqueue/dequeue operation should be O(1), because // there are exactly 2 locks. This could be O(n) if all // the waiters for both locks are on the same list, as it // once was.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 21 19:37:22 UTC 2022 - 4.2K bytes - Viewed (0) -
src/sync/mutex.go
// the unlocking goroutine to the waiter at the front of the queue. // New arriving goroutines don't try to acquire the mutex even if it appears // to be unlocked, and don't try to spin. Instead they queue themselves at // the tail of the wait queue. // // If a waiter receives ownership of the mutex and sees that either // (1) it is the last waiter in the queue, or (2) it waited for less than 1 ms,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 21:14:51 UTC 2024 - 8.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/testing/eventclock/fake.go
// events to run at that or an earlier time. // Events should not advance the clock. But just in case they do... now := fec.Now() for len(fec.waiters) > 0 && !now.Before(fec.waiters[0].targetTime) { ew := heap.Pop(&fec.waiters).(eventWaiter) fec.clientWG.Add(1) go func(f eventclock.EventFunc, now time.Time) { f(now) fec.clientWG.Add(-1) }(ew.f, now) foundSome = true
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sun Dec 18 04:27:38 UTC 2022 - 7.9K bytes - Viewed (0) -
src/sync/cond_test.go
func TestCondSignalStealing(t *testing.T) { for iters := 0; iters < 1000; iters++ { var m Mutex cond := NewCond(&m) // Start a waiter. ch := make(chan struct{}) go func() { m.Lock() ch <- struct{}{} cond.Wait() m.Unlock() ch <- struct{}{} }() <-ch m.Lock() m.Unlock() // We know that the waiter is in the cond.Wait() call because we
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 22 18:52:42 UTC 2023 - 5K bytes - Viewed (0) -
test/chan/select6.go
// Test for select: Issue 2075 // A bug in select corrupts channel queues of failed cases // if there are multiple waiters on those channels and the // select is the last in the queue. If further waits are made // on the channel without draining it first then those waiters // will never wake up. In the code below c1 is such a channel. package main func main() { c1 := make(chan bool) c2 := make(chan bool)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 783 bytes - Viewed (0) -
src/sync/waitgroup.go
} // This goroutine has set counter to 0 when waiters > 0. // Now there can't be concurrent mutations of state: // - Adds must not happen concurrently with Wait, // - Wait does not increment waiters if it sees counter == 0. // Still do a cheap sanity check to detect WaitGroup misuse. if wg.state.Load() != state { panic("sync: WaitGroup misuse: Add called concurrently with Wait") } // Reset waiters count to 0. wg.state.Store(0)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 21:14:51 UTC 2024 - 4K bytes - Viewed (0)