Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 460 for chan2 (0.04 sec)

  1. src/internal/fmtsort/sort_test.go

    			}
    		}
    		return "UNSAFEPTR???"
    	case "chan int":
    		c := key.Interface().(chan int)
    		for i := range chans {
    			if c == chans[i] {
    				return fmt.Sprintf("CHAN%d", i)
    			}
    		}
    		return "CHAN???"
    	default:
    		return fmt.Sprint(key)
    	}
    }
    
    var (
    	ints  [3]int
    	chans = makeChans()
    	pin   runtime.Pinner
    )
    
    func makeChans() []chan int {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  2. src/runtime/chan.go

    	dataqsiz uint           // size of the circular queue
    	buf      unsafe.Pointer // points to an array of dataqsiz elements
    	elemsize uint16
    	closed   uint32
    	timer    *timer // timer feeding this chan
    	elemtype *_type // element type
    	sendx    uint   // send index
    	recvx    uint   // receive index
    	recvq    waitq  // list of recv waiters
    	sendq    waitq  // list of send waiters
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:50 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/internal/typeparams/coretype.go

    		return U
    	}
    	ch, ok := U.(*types.Chan)
    	if !ok {
    		return nil // no core type as identical < len(terms) and U is not a channel.
    	}
    	// https://go.dev/ref/spec#Core_types
    	// "the type chan E if T contains only bidirectional channels, or the type chan<- E or
    	// <-chan E depending on the direction of the directional channels present."
    	for chans := identical; chans < len(terms); chans++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  4. cmd/kube-proxy/app/server_test.go

    func Test_getNodeIPs(t *testing.T) {
    	var chans [3]chan error
    
    	client := clientsetfake.NewSimpleClientset(
    		// node1 initially has no IP address.
    		makeNodeWithAddress("node1", ""),
    
    		// node2 initially has an invalid IP address.
    		makeNodeWithAddress("node2", "invalid-ip"),
    
    		// node3 initially does not exist.
    	)
    
    	for i := range chans {
    		chans[i] = make(chan error)
    		ch := chans[i]
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 05:08:41 UTC 2024
    - 32.3K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/watch/watch.go

    // ResultChan implements Interface
    func (w emptyWatch) ResultChan() <-chan Event {
    	return chan Event(w)
    }
    
    // FakeWatcher lets you test anything that consumes a watch.Interface; threadsafe.
    type FakeWatcher struct {
    	result  chan Event
    	stopped bool
    	sync.Mutex
    }
    
    func NewFake() *FakeWatcher {
    	return &FakeWatcher{
    		result: make(chan Event),
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 20:06:22 UTC 2024
    - 8.1K bytes
    - Viewed (1)
  6. internal/grid/muxserver.go

    		if debugPrint {
    			fmt.Println("connected stream mux:", ack.MuxID)
    		}
    	}()
    
    	// Data inbound to the handler
    	var handlerIn chan []byte
    	if inboundCap > 0 {
    		m.inbound = make(chan []byte, inboundCap)
    		handlerIn = make(chan []byte, 1)
    		go func(inbound chan []byte) {
    			wg.Wait()
    			defer xioutil.SafeClose(handlerIn)
    			m.handleInbound(c, inbound, handlerIn)
    		}(m.inbound)
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  7. src/internal/trace/testdata/testprog/stacks.go

    	go func() { // func1
    		select {}
    	}()
    	go func() { // func2
    		var c chan int
    		c <- 0
    	}()
    	go func() { // func3
    		var c chan int
    		<-c
    	}()
    	done1 := make(chan bool)
    	go func() { // func4
    		<-done1
    	}()
    	done2 := make(chan bool)
    	go func() { // func5
    		done2 <- true
    	}()
    	c1 := make(chan int)
    	c2 := make(chan int)
    	go func() { // func6
    		select {
    		case <-c1:
    		case <-c2:
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  8. pilot/pkg/xds/discovery_test.go

    	c := make(chan struct{})
    	go func() {
    		wg.Wait()
    		c <- struct{}{}
    	}()
    	select {
    	case <-c:
    		return true
    	case <-time.After(timeout):
    		return false
    	}
    }
    
    func TestSendPushesManyPushes(t *testing.T) {
    	stopCh := make(chan struct{})
    	defer close(stopCh)
    
    	semaphore := make(chan struct{}, 2)
    	queue := NewPushQueue()
    	defer queue.ShutDown()
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 00:26:45 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  9. internal/grid/grid_test.go

    	remoteHost := remote.HostName()
    
    	// 1: Echo
    	serverSent := make(chan struct{})
    	serverCanceled := make(chan struct{})
    	register := func(manager *Manager) {
    		errFatal(manager.RegisterStreamingHandler(handlerTest, StreamHandler{
    			Handle: func(ctx context.Context, payload []byte, _ <-chan []byte, resp chan<- []byte) *RemoteErr {
    				// Send many responses.
    				// Test that this doesn't block.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 36.4K bytes
    - Viewed (0)
  10. pkg/kube/kclient/crdwatcher.go

    	callbacks map[string][]func()
    
    	running chan struct{}
    	stop    <-chan struct{}
    }
    
    func init() {
    	// Unfortunate hack needed to avoid circular imports
    	kube.NewCrdWatcher = newCrdWatcher
    }
    
    // newCrdWatcher returns a new CRD watcher controller.
    func newCrdWatcher(client kube.Client) kubetypes.CrdWatcher {
    	c := &crdWatcher{
    		running:   make(chan struct{}),
    		callbacks: map[string][]func(){},
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 14:44:17 UTC 2024
    - 5.7K bytes
    - Viewed (0)
Back to top