- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of about 10,000 for ctan (0.04 sec)
-
src/internal/singleflight/singleflight.go
// results when they are ready. func (g *Group) DoChan(key string, fn func() (any, error)) <-chan Result { ch := make(chan Result, 1) g.mu.Lock() if g.m == nil { g.m = make(map[string]*call) } if c, ok := g.m[key]; ok { c.dups++ c.chans = append(c.chans, ch) g.mu.Unlock() return ch } c := &call{chans: []chan<- Result{ch}} c.wg.Add(1) g.m[key] = c g.mu.Unlock() go g.doCall(c, key, fn)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 30 20:49:56 UTC 2022 - 3.1K bytes - Viewed (0) -
pilot/pkg/config/monitor/monitor_test.go
err = nil case 3: configs = updateConfigSet case 6: configs = []*config.Config{} } callCount++ return configs, err } mon := NewMonitor("", store, someConfigFunc, "") stop := make(chan struct{}) defer func() { close(stop) }() mon.Start(stop) go func() { for i := 0; i < 10; i++ { select { case <-stop: return case mon.updateCh <- struct{}{}: }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Oct 31 14:48:28 UTC 2023 - 4.8K bytes - Viewed (0) -
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 { case <-c:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 2.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/filters/mux_discovery_complete.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Oct 21 13:25:33 UTC 2021 - 2.8K bytes - Viewed (0) -
src/os/signal/example_test.go
// license that can be found in the LICENSE file. package signal_test import ( "fmt" "os" "os/signal" ) func ExampleNotify() { // Set up channel on which to send signal notifications. // We must use a buffered channel or risk missing the signal // if we're not ready to receive when the signal is sent. c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 01 18:38:23 UTC 2017 - 1001 bytes - Viewed (0) -
pkg/scheduler/metrics/resources/resources.go
total *metrics.Desc } func (d resourceLifecycleDescriptors) Describe(ch chan<- *metrics.Desc) { ch <- d.total } type resourceMetricsDescriptors struct { requests resourceLifecycleDescriptors limits resourceLifecycleDescriptors } func (d resourceMetricsDescriptors) Describe(ch chan<- *metrics.Desc) { d.requests.Describe(ch) d.limits.Describe(ch) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 09 23:15:53 UTC 2023 - 6.8K bytes - Viewed (0) -
cni/cmd/install-cni/main.go
"istio.io/istio/pkg/log" ) func main() { // Create context that cancels on termination signal ctx, cancel := context.WithCancel(context.Background()) sigChan := make(chan os.Signal, 1) signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM) go func(sigChan chan os.Signal, cancel context.CancelFunc) { sig := <-sigChan log.Infof("Exit signal received: %s", sig) cancel() }(sigChan, cancel) rootCmd := cmd.GetCommand()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 23 17:08:31 UTC 2023 - 1.2K bytes - Viewed (0) -
src/cmd/go/internal/script/conds.go
func (c *cachedCond) Usage() *CondUsage { return &c.usage } func (c *cachedCond) Eval(_ *State, suffix string) (bool, error) { for { var ready chan struct{} v, loaded := c.m.Load(suffix) if !loaded { ready = make(chan struct{}) v, loaded = c.m.LoadOrStore(suffix, (<-chan struct{})(ready)) if !loaded { inPanic := true defer func() { if inPanic { c.m.Delete(suffix) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 24 21:26:10 UTC 2022 - 5K bytes - Viewed (0) -
pkg/registry/flowcontrol/rest/storage_flowcontrol_test.go
limitations under the License. */ package rest import ( "context" "testing" "time" ) func TestContextFromChannelAndMaxWaitDurationWithChannelClosed(t *testing.T) { stopCh := make(chan struct{}) ctx, cancel := contextFromChannelAndMaxWaitDuration(stopCh, time.Hour) defer cancel() select { case <-ctx.Done(): t.Fatalf("Expected the derived context to be not cancelled, but got: %v", ctx.Err())
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 17 16:08:39 UTC 2021 - 1.5K bytes - Viewed (0) -
src/internal/types/testdata/spec/comparisons.go
_ = b == b _ = a /* ERROR "[10]func() cannot be compared" */ == a _ = l /* ERROR "slice can only be compared to nil" */ == l _ = s /* ERROR "struct containing []byte cannot be compared" */ == s _ = p == p _ = f /* ERROR "func can only be compared to nil" */ == f _ = i == i _ = m /* ERROR "map can only be compared to nil" */ == m _ = c == c _ = b == nil /* ERROR "mismatched types" */
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 17 19:54:27 UTC 2023 - 3K bytes - Viewed (0)