Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 178 for waiters (0.38 sec)

  1. src/runtime/testdata/testprognet/waiters.go

    		}
    		defer conn.Close()
    		for i := 0; i < 10; i++ {
    			fmt.Fprintf(conn, "%d\n", i)
    			time.Sleep(time.Millisecond)
    		}
    	}()
    
    	wg.Wait()
    	if v := netpollWaiters.Load(); v != 0 {
    		log.Fatalf("current waiters %v", v)
    	}
    
    	fmt.Println("OK")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

        }
    
        /** Performs a GAS operation on the {@link #waiters} field. */
        @Override
        Waiter gasWaiters(AbstractFuture<?> future, Waiter update) {
          while (true) {
            Waiter waiter = future.waiters;
            if (update == waiter) {
              return waiter;
            }
            if (casWaiters(future, waiter, update)) {
              return waiter;
            }
          }
        }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Jun 07 22:25:23 UTC 2024
    - 63.1K bytes
    - Viewed (1)
  7. guava/src/com/google/common/util/concurrent/AbstractFuture.java

        /** Non-volatile write of the thread to the {@link Waiter#thread} field. */
        abstract void putThread(Waiter waiter, Thread newValue);
    
        /** Non-volatile write of the waiter to the {@link Waiter#next} field. */
        abstract void putNext(Waiter waiter, @CheckForNull Waiter newValue);
    
        /** Performs a CAS operation on the {@link #waiters} field. */
        abstract boolean casWaiters(
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Jun 07 22:25:23 UTC 2024
    - 62.8K bytes
    - Viewed (1)
  8. staging/src/k8s.io/apiserver/pkg/admission/plugin/resourcequota/controller.go

    	if !evaluator.Handles(a) {
    		return nil
    	}
    	waiter := newAdmissionWaiter(a)
    
    	e.addWork(waiter)
    
    	// wait for completion or timeout
    	select {
    	case <-waiter.finished:
    	case <-time.After(10 * time.Second):
    		return apierrors.NewInternalError(fmt.Errorf("resource quota evaluation timed out"))
    	}
    
    	return waiter.result
    }
    
    func (e *quotaEvaluator) addWork(a *admissionWaiter) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_progress_test.go

    		return requestsSent == wantRequestsSent
    	}); err != nil {
    		t.Fatalf("Failed to wait progress requests, err: %s, want: %d , got %d", err, wantRequestsSent, requestsSent)
    	}
    
    	logger.Info("Adding waiters allows progress request to be sent")
    	pr.Add()
    	wantRequestsSent++
    	if err := pollConditionNoChange(pollPeriod, minimalNoChange, pollTimeout, func() bool {
    		requestsSent = pr.progressRequestsSentCount.Load()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 04 11:51:06 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  10. src/runtime/chan.go

    	closed   uint32
    	timer    *timer // timer feeding this chan
    	elemtype *_type // element type
    	sendx    uint   // send index
    	recvx    uint   // receive index
    	recvq    waitq  // list of recv waiters
    	sendq    waitq  // list of send waiters
    
    	// lock protects all fields in hchan, as well as several
    	// fields in sudogs blocked on this channel.
    	//
    	// Do not change another G's status while holding this lock
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:50 UTC 2024
    - 25.9K bytes
    - Viewed (0)
Back to top