Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 1,230 for unlock2 (1.06 sec)

  1. src/sync/mutex.go

    	if race.Enabled {
    		race.Acquire(unsafe.Pointer(m))
    	}
    }
    
    // Unlock unlocks m.
    // It is a run-time error if m is not locked on entry to Unlock.
    //
    // A locked [Mutex] is not associated with a particular goroutine.
    // It is allowed for one goroutine to lock a Mutex and then
    // arrange for another goroutine to unlock it.
    func (m *Mutex) Unlock() {
    	if race.Enabled {
    		_ = m.state
    		race.Release(unsafe.Pointer(m))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/runtime/waiting_pods_map.go

    	m.mu.Lock()
    	defer m.mu.Unlock()
    	m.pods[wp.GetPod().UID] = wp
    }
    
    // remove a WaitingPod from the map.
    func (m *waitingPodsMap) remove(uid types.UID) {
    	m.mu.Lock()
    	defer m.mu.Unlock()
    	delete(m.pods, uid)
    }
    
    // get a WaitingPod from the map.
    func (m *waitingPodsMap) get(uid types.UID) *waitingPod {
    	m.mu.RLock()
    	defer m.mu.RUnlock()
    	return m.pods[uid]
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  3. src/syscall/forkpipe2.go

    // acquired by acquireForkLock.
    func releaseForkLock() {
    	forkingLock.Lock()
    	defer forkingLock.Unlock()
    
    	if forking <= 0 {
    		panic("syscall.releaseForkLock: negative count")
    	}
    
    	forking--
    
    	if forking == 0 {
    		// No more conceptual write locks.
    		ForkLock.Unlock()
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jul 10 19:19:59 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  4. src/runtime/race/testdata/rwmutex_test.go

    		x = 2
    		ch <- true
    	}()
    	go func() {
    		mu.RLock()
    		y := x + 1
    		_ = y
    		mu.RUnlock()
    		ch <- true
    	}()
    	go func() {
    		mu.RLock()
    		y := x + 2
    		_ = y
    		mu.RUnlock()
    		ch <- true
    	}()
    	go func() {
    		mu.RLock()
    		y := x + 3
    		_ = y
    		mu.RUnlock()
    		ch <- true
    	}()
    	<-ch
    	<-ch
    	<-ch
    	<-ch
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 03 22:09:38 UTC 2017
    - 2.1K bytes
    - Viewed (0)
  5. src/sync/cond.go

    // Wait returns. Instead, the caller should Wait in a loop:
    //
    //	c.L.Lock()
    //	for !condition() {
    //	    c.Wait()
    //	}
    //	... make use of condition ...
    //	c.L.Unlock()
    func (c *Cond) Wait() {
    	c.checker.check()
    	t := runtime_notifyListAdd(&c.notify)
    	c.L.Unlock()
    	runtime_notifyListWait(&c.notify, t)
    	c.L.Lock()
    }
    
    // Signal wakes one goroutine waiting on c, if there is any.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  6. cmd/namespace-lock.go

    			delete(n.lockMap, resource)
    		}
    		n.lockMapMutex.Unlock()
    	}
    
    	return
    }
    
    // Unlock the namespace resource.
    func (n *nsLockMap) unlock(volume string, path string, readLock bool) {
    	resource := pathJoin(volume, path)
    
    	n.lockMapMutex.Lock()
    	defer n.lockMapMutex.Unlock()
    	if _, found := n.lockMap[resource]; !found {
    		return
    	}
    	if readLock {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 05 23:56:35 UTC 2023
    - 9.2K bytes
    - Viewed (0)
  7. src/net/internal/socktest/sys_windows.go

    	f, _ := sw.fltab[FilterSocket]
    	sw.fmu.RUnlock()
    
    	af, err := f.apply(so)
    	if err != nil {
    		return syscall.InvalidHandle, err
    	}
    	s, so.Err = windows.WSASocket(family, sotype, proto, protinfo, group, flags)
    	if err = af.apply(so); err != nil {
    		if so.Err == nil {
    			syscall.Closesocket(s)
    		}
    		return syscall.InvalidHandle, err
    	}
    
    	sw.smu.Lock()
    	defer sw.smu.Unlock()
    	if so.Err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  8. src/runtime/chan.go

    	gp.parkingOnChan.Store(false)
    	// Make sure we unlock after setting activeStackChans and
    	// unsetting parkingOnChan. The moment we unlock chanLock
    	// we risk gp getting readied by a channel operation and
    	// so gp could continue running before everything before
    	// the unlock is visible (even to gp itself).
    	unlock((*mutex)(chanLock))
    	return true
    }
    
    // compiler implements
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:50 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  9. pkg/kubelet/runtime.go

    	defer s.Unlock()
    	s.runtimeError = err
    }
    
    func (s *runtimeState) setRuntimeHandlers(rtHandlers []kubecontainer.RuntimeHandler) {
    	s.Lock()
    	defer s.Unlock()
    	s.rtHandlers = rtHandlers
    }
    
    func (s *runtimeState) runtimeHandlers() []kubecontainer.RuntimeHandler {
    	s.RLock()
    	defer s.RUnlock()
    	return s.rtHandlers
    }
    
    func (s *runtimeState) setStorageState(err error) {
    	s.Lock()
    	defer s.Unlock()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 09 00:48:07 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/endpoints/discovery/aggregated/fake.go

    	f.lock.RLock()
    	defer f.lock.RUnlock()
    
    	f.expect.lock.RLock()
    	defer f.expect.lock.RUnlock()
    
    	return len(f.Actions) >= len(f.expect.Actions)
    }
    
    func (f *fakeResourceManager) Validate() error {
    	f.lock.RLock()
    	defer f.lock.RUnlock()
    
    	f.expect.lock.RLock()
    	defer f.expect.lock.RUnlock()
    
    	if !reflect.DeepEqual(f.expect.Actions, f.Actions) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 18:15:22 UTC 2024
    - 4.4K bytes
    - Viewed (0)
Back to top