- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 8,530 for ctan (0.06 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) -
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) -
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) -
internal/grid/stream.go
// All responses *must* be read by the caller until either an error is returned or the channel is closed. // Canceling the context will cause the context cancellation error to be returned. responses <-chan Response cancel context.CancelCauseFunc // Requests sent to the server. // If the handler is defined with 0 incoming capacity this will be nil. // Channel *must* be closed to signal the end of the stream.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 3.1K bytes - Viewed (0) -
src/net/mptcpsock_linux_test.go
defer ls.teardown() if g, w := ls.Listener.Addr().Network(), "tcp"; g != w { t.Fatalf("Network type mismatch: got %q, want %q", g, w) } genericCh := make(chan error) mptcpCh := make(chan error) handler := func(ls *localServer, ln Listener) { ls.transponder(ln, genericCh) postAcceptMPTCP(ls, mptcpCh) } if err := ls.buildup(handler); err != nil { t.Fatal(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jul 11 00:36:57 UTC 2023 - 4.1K bytes - Viewed (0) -
src/cmd/go/testdata/script/test_chatty_parallel_success.txt
parallel := flag.Lookup("test.parallel").Value.(flag.Getter).Get().(int) // ready is a synchronization mechanism that causes subtests to execute // round robin. ready := make([]chan bool, parallel) for i := range ready { ready[i] = make(chan bool, 1) } ready[0] <- true for i := range ready { i := i t.Run(fmt.Sprintf("sub-%d", i), func(t *testing.T) { t.Parallel() for j := 0; j < 2; j++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 26 19:50:36 UTC 2022 - 1.9K bytes - Viewed (0)