Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of about 10,000 for ctan (0.33 sec)

  1. src/cmd/compile/internal/types2/builtins_test.go

    	{"clear", `var s []byte; clear(s)`, `func([]byte)`},
    
    	{"close", `var c chan int; close(c)`, `func(chan int)`},
    	{"close", `var c chan<- chan string; close(c)`, `func(chan<- chan string)`},
    
    	{"complex", `_ = complex(1, 0)`, `invalid type`}, // constant
    	{"complex", `var re float32; _ = complex(re, 1.0)`, `func(float32, float32) complex64`},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 18:06:31 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  2. src/runtime/stack_test.go

    	const (
    		R = 4
    		G = 200
    		S = 5
    	)
    	for i := 0; i < R; i++ {
    		var reqchans [G]chan int
    		done := make(chan struct{})
    		for j := 0; j < G; j++ {
    			reqchans[j] = make(chan int)
    			go growing(reqchans[j], done)
    		}
    		for s := 0; s < S; s++ {
    			for j := 0; j < G; j++ {
    				reqchans[j] <- 1 << uint(s)
    			}
    			for j := 0; j < G; j++ {
    				<-done
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 23.1K bytes
    - Viewed (0)
  3. cmd/service.go

    	globalServiceFreezeMu.Lock()
    	// Close when we reach 0
    	globalServiceFreezeCnt--
    	if globalServiceFreezeCnt <= 0 {
    		// Set to a nil channel.
    		var _ch chan struct{}
    		if val := globalServiceFreeze.Swap(_ch); val != nil {
    			if ch, ok := val.(chan struct{}); ok && ch != nil {
    				// Close previous non-nil channel.
    				xioutil.SafeClose(ch)
    			}
    		}
    		globalServiceFreezeCnt = 0 // Don't risk going negative.
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Feb 28 07:02:14 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  4. pilot/pkg/config/memory/monitor_test.go

    )
    
    func TestMonitorLifecycle(t *testing.T) {
    	// Regression test to ensure no race conditions during monitor shutdown
    	store := memory.Make(collections.Mocks)
    	m := memory.NewMonitor(store)
    	stop := make(chan struct{})
    	go m.Run(stop)
    	m.ScheduleProcessEvent(memory.ConfigEvent{})
    	close(stop)
    	m.ScheduleProcessEvent(memory.ConfigEvent{})
    }
    
    func TestEventConsistency(t *testing.T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 01 01:34:15 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  5. test/fixedbugs/issue38093.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Test race condition between timers and wasm calls that led to memory corruption.
    
    package main
    
    import (
    	"os"
    	"syscall/js"
    	"time"
    )
    
    func main() {
    	ch1 := make(chan struct{})
    
    	go func() {
    		for {
    			time.Sleep(5 * time.Millisecond)
    			ch1 <- struct{}{}
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 861 bytes
    - Viewed (0)
  6. 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)
  7. 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)
  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 {
    					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)
  9. staging/src/k8s.io/apiserver/pkg/endpoints/filters/mux_discovery_complete.go

    		}
    		handler.ServeHTTP(w, req)
    	})
    }
    
    // isClosed is a convenience function that simply check if the given chan has been closed
    func isClosed(ch <-chan struct{}) bool {
    	select {
    	case <-ch:
    		return true
    	default:
    		return false
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 21 13:25:33 UTC 2021
    - 2.8K bytes
    - Viewed (0)
  10. 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)
Back to top