Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 7,000 for Wake (0.05 sec)

  1. src/runtime/lock_sema.go

    //		If ns >= 0, try to acquire m's semaphore for at most ns nanoseconds.
    //		Return 0 if the semaphore was acquired, -1 if interrupted or timed out.
    //
    //	func semawakeup(mp *m)
    //		Wake up mp, which is or will soon be sleeping on its semaphore.
    const (
    	locked uintptr = 1
    
    	active_spin     = 4
    	active_spin_cnt = 30
    	passive_spin    = 1
    )
    
    func mutexContended(l *mutex) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  2. src/context/example_test.go

    			// If multiple goroutines are waiting on cond simultaneously,
    			// we need to make sure we wake up exactly this one.
    			// That means that we need to Broadcast to all of the goroutines,
    			// which will wake them all up.
    			//
    			// If there are N concurrent calls to waitOnCond, each of the goroutines
    			// will spuriously wake up O(N) other goroutines that aren't ready yet,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 20:24:28 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  3. subprojects/composite-builds/src/main/java/org/gradle/composite/internal/DefaultBuildControllers.java

            }
            return result;
        }
    
        private void awaitCompletion(CountDownLatch complete) {
            while (true) {
                // Wake for the work in all builds to complete. Periodically wake up and check the executor health
    
                AtomicBoolean done = new AtomicBoolean();
                // Ensure that this thread does not hold locks while waiting and so prevent this work from completing
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 23 10:37:35 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  4. src/runtime/trace.go

    			if !trace.reader.CompareAndSwapNoWB(nil, gp) {
    				// We're racing with another reader.
    				// Wake up and handle this case.
    				return false
    			}
    
    			if g2 := traceReader(); gp == g2 {
    				// New data arrived between unlocking
    				// and the CAS and we won the wake-up
    				// race, so wake up directly.
    				return false
    			} else if g2 != nil {
    				printlock()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 37.1K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java

                BrokenChannel bc = new BrokenChannel();
                bc.doBegin();
                isInterruptibleRegistered.countDown();
                new CountDownLatch(1).await(); // the interrupt will wake us up
                return null;
              }
    
              @Override
              boolean isDone() {
                return false;
              }
    
              @Override
              String toPendingString() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java

                BrokenChannel bc = new BrokenChannel();
                bc.doBegin();
                isInterruptibleRegistered.countDown();
                new CountDownLatch(1).await(); // the interrupt will wake us up
                return null;
              }
    
              @Override
              boolean isDone() {
                return false;
              }
    
              @Override
              String toPendingString() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  7. src/sync/mutex.go

    		if old&(mutexLocked|mutexStarving) == mutexLocked && runtime_canSpin(iter) {
    			// Active spinning makes sense.
    			// Try to set mutexWoken flag to inform Unlock
    			// to not wake other blocked goroutines.
    			if !awoke && old&mutexWoken == 0 && old>>mutexWaiterShift != 0 &&
    				atomic.CompareAndSwapInt32(&m.state, old, old|mutexWoken) {
    				awoke = true
    			}
    			runtime_doSpin()
    			iter++
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  8. test/chanlinear.go

    				typ, n, t1, 2*n, t2))
    		}
    	}
    }
    
    func main() {
    	checkLinear("chanSelect", 1000, func(n int) {
    		const messages = 10
    		c := make(chan bool) // global channel
    		var a []chan bool    // local channels for each goroutine
    		for i := 0; i < n; i++ {
    			d := make(chan bool)
    			a = append(a, d)
    			go func() {
    				for j := 0; j < messages; j++ {
    					// queue ourselves on the global channel
    					select {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  9. src/runtime/netpoll_kqueue_pipe.go

    import "unsafe"
    
    // TODO(panjf2000): NetBSD didn't implement EVFILT_USER for user-established events
    // until NetBSD 10.0, check out https://www.netbsd.org/releases/formal-10/NetBSD-10.0.html
    // Therefore we use the pipe to wake up the kevent on NetBSD at this point. Get back here
    // and switch to EVFILT_USER when we bump up the minimal requirement of NetBSD to 10.0.
    // Alternatively, maybe we can use EVFILT_USER on the NetBSD by checking the kernel version
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 12 21:17:22 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  10. src/runtime/time.go

    	ts.lock()
    	ts.cleanHead()
    	t.lock()
    	t.trace("maybeAdd")
    	when := int64(0)
    	wake := false
    	if t.needsAdd() {
    		t.state |= timerHeaped
    		when = t.when
    		wakeTime := ts.wakeTime()
    		wake = wakeTime == 0 || when < wakeTime
    		ts.addHeap(t)
    	}
    	t.unlock()
    	ts.unlock()
    	releasem(mp)
    	if wake {
    		wakeNetPoller(when)
    	}
    }
    
    // reset resets the time when a timer should fire.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 14:36:24 UTC 2024
    - 37.5K bytes
    - Viewed (0)
Back to top