Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for Unlock1 (0.13 sec)

  1. 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)
  2. src/sync/rwmutex.go

    		rw.w.Unlock()
    		if race.Enabled {
    			race.Enable()
    		}
    		return false
    	}
    	if race.Enabled {
    		race.Enable()
    		race.Acquire(unsafe.Pointer(&rw.readerSem))
    		race.Acquire(unsafe.Pointer(&rw.writerSem))
    	}
    	return true
    }
    
    // Unlock unlocks rw for writing. It is a run-time error if rw is
    // not locked for writing on entry to Unlock.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  3. 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)
  4. staging/src/k8s.io/apimachinery/pkg/watch/watch.go

    	f.Lock()
    	defer f.Unlock()
    	if !f.stopped {
    		klog.V(4).Infof("Stopping fake watcher.")
    		close(f.result)
    		f.stopped = true
    	}
    }
    
    func (f *FakeWatcher) IsStopped() bool {
    	f.Lock()
    	defer f.Unlock()
    	return f.stopped
    }
    
    // Reset prepares the watcher to be reused.
    func (f *FakeWatcher) Reset() {
    	f.Lock()
    	defer f.Unlock()
    	f.stopped = false
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 20:06:22 UTC 2024
    - 8.1K bytes
    - Viewed (1)
  5. internal/grid/muxserver.go

    	} else {
    		m.send(message{Op: OpDisconnectClientMux, MuxID: m.ID})
    	}
    	// Unlock, since we are calling deleteMux, which will call close - which will lock recvMu.
    	if locked {
    		m.recvMu.Unlock()
    		defer m.recvMu.Lock()
    	}
    	m.parent.deleteMux(true, m.ID)
    }
    
    func (m *muxServer) send(msg message) {
    	m.sendMu.Lock()
    	defer m.sendMu.Unlock()
    	msg.MuxID = m.ID
    	msg.Seq = m.SendSeq
    	m.SendSeq++
    	if debugPrint {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  6. pkg/kube/namespace/filter.go

    		f.selectorsChanged(mesh.Mesh().GetDiscoverySelectors(), true)
    	})
    
    	namespaces.AddEventHandler(controllers.EventHandler[*corev1.Namespace]{
    		AddFunc: func(ns *corev1.Namespace) {
    			f.lock.Lock()
    			defer f.lock.Unlock()
    			// In rare cases, a namespace may be created after objects in the namespace, because there is no synchronization between watches
    			// So we need to notify if we started selecting namespace
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 10 17:12:52 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  7. pkg/ctrlz/ctrlz.go

    				return ipnet.IP.String()
    			}
    		}
    	}
    	return ""
    }
    
    type topic struct {
    	Name string
    	URL  string
    }
    
    func getTopics() []topic {
    	topicMutex.Lock()
    	defer topicMutex.Unlock()
    
    	topics := make([]topic, 0, len(allTopics))
    	for _, t := range allTopics {
    		topics = append(topics, topic{Name: t.Title(), URL: "/" + t.Prefix() + "z/"})
    	}
    
    	return topics
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 11 21:22:53 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  8. src/sync/once.go

    	if o.done.Load() == 0 {
    		// Outlined slow-path to allow inlining of the fast-path.
    		o.doSlow(f)
    	}
    }
    
    func (o *Once) doSlow(f func()) {
    	o.m.Lock()
    	defer o.m.Unlock()
    	if o.done.Load() == 0 {
    		defer o.done.Store(1)
    		f()
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  9. src/os/exec_unix.go

    		// so that Process.pidSignal will not send a signal.
    		p.pidDeactivate(statusDone)
    		// Acquire a write lock on sigMu to wait for any
    		// active call to the signal method to complete.
    		p.sigMu.Lock()
    		p.sigMu.Unlock()
    	}
    
    	var (
    		status syscall.WaitStatus
    		rusage syscall.Rusage
    		pid1   int
    		e      error
    	)
    	for {
    		pid1, e = syscall.Wait4(p.Pid, &status, 0, &rusage)
    		if e != syscall.EINTR {
    			break
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  10. cni/pkg/log/uds.go

    		if !ok {
    			continue
    		}
    		messages = append(messages, msg)
    	}
    	// Lock log message printing to prevent log messages from different CNI
    	// processes interleave.
    	l.mu.Lock()
    	defer l.mu.Unlock()
    	for _, m := range messages {
    		logger := pluginLog
    		// For any k/v pairs, add them back
    		for k, v := range m.Arbitrary {
    			logger = logger.WithLabels(k, v)
    		}
    		// There is no fatal log from CNI plugin
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 12 16:26:28 UTC 2024
    - 4.7K bytes
    - Viewed (0)
Back to top