Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of about 10,000 for ctan (0.06 sec)

  1. misc/cgo/gmp/fib.go

    // license that can be found in the LICENSE file.
    
    //go:build ignore
    
    // Compute Fibonacci numbers with two goroutines
    // that pass integers back and forth.  No actual
    // concurrency, just threads and synchronization
    // and foreign code on multiple pthreads.
    
    package main
    
    import (
    	big "."
    	"runtime"
    )
    
    func fibber(c chan *big.Int, out chan string, n int64) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 10 22:32:35 UTC 2023
    - 919 bytes
    - Viewed (0)
  2. src/internal/reflectlite/set_test.go

    	x any
    	t any
    	b bool
    }{
    	{new(chan int), new(<-chan int), true},
    	{new(<-chan int), new(chan int), false},
    	{new(*int), new(IntPtr), true},
    	{new(IntPtr), new(*int), true},
    	{new(IntPtr), new(IntPtr1), false},
    	{new(Ch), new(<-chan any), true},
    	// test runs implementsTests too
    }
    
    type IntPtr *int
    type IntPtr1 *int
    type Ch <-chan any
    
    func TestAssignableTo(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 2.4K bytes
    - Viewed (0)
  3. pkg/queue/delay.go

    	}
    	for _, o := range opts {
    		o(q)
    	}
    	return q
    }
    
    type delayQueue struct {
    	workers       int
    	workerStopped []chan struct{}
    
    	// incoming
    	enqueue chan *delayTask
    	// outgoing
    	execute chan *delayTask
    
    	mu    sync.Mutex
    	queue *pq
    }
    
    // Push will execute the task as soon as possible
    func (d *delayQueue) Push(task Task) {
    	d.pushInternal(&delayTask{do: task, runAt: time.Now()})
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jul 20 06:27:31 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  4. test/typeparam/chansimp.dir/main.go

    	if !a.SliceEqual(got, want) {
    		panic(fmt.Sprintf("ReadAll returned %v, want %v", got, want))
    	}
    }
    
    func TestMerge() {
    	c1 := make(chan int)
    	c2 := make(chan int)
    	go func() {
    		c1 <- 1
    		c1 <- 3
    		c1 <- 5
    		close(c1)
    	}()
    	go func() {
    		c2 <- 2
    		c2 <- 4
    		c2 <- 6
    		close(c2)
    	}()
    	ctx := context.Background()
    	got := a.ReadAll(ctx, a.Merge(ctx, c1, c2))
    	sort.Ints(got)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 02:14:15 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  5. internal/grid/muxclient.go

    		responseCh <- resp
    	}
    }
    
    func (m *muxClient) handleTwowayRequests(errResp chan<- Response, requests <-chan []byte) {
    	var errState bool
    	if debugPrint {
    		start := time.Now()
    		defer func() {
    			fmt.Println("Mux", m.MuxID, "Request took", time.Since(start).Round(time.Millisecond))
    		}()
    	}
    
    	var pingTimer <-chan time.Time
    	if m.deadline == 0 || m.deadline > m.clientPingInterval {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 15.9K bytes
    - Viewed (0)
  6. src/reflect/type_test.go

    		{"struct{i int; s S}", args{reflect.TypeOf(struct {
    			i int
    			s S
    		}{})}, true},
    		{"map[int][int]", args{reflect.TypeOf(map[int]int{})}, false},
    		{"[4]chan int", args{reflect.TypeOf([4]chan int{})}, true},
    		{"[0]struct{_ S}", args{reflect.TypeOf([0]struct {
    			_ S
    		}{})}, true},
    		{"struct{i int; _ S}", args{reflect.TypeOf(struct {
    			i int
    			_ S
    		}{})}, false},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 23:39:44 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  7. pilot/pkg/server/instance_test.go

    	completed *atomic.Bool
    	d         time.Duration
    	stop      chan struct{}
    }
    
    func newFakeComponent(d time.Duration, stop chan struct{}) *fakeComponent {
    	return &fakeComponent{
    		started:   atomic.NewBool(false),
    		completed: atomic.NewBool(false),
    		d:         d,
    		stop:      stop,
    	}
    }
    
    func (c *fakeComponent) Run(stop <-chan struct{}) error {
    	c.started.Store(true)
    	select {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 23:02:39 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  8. pkg/revisions/default_watcher_test.go

    func expectRevisionChan(t test.Failer, revisionChan chan string, expected string) {
    	select {
    	case rev := <-revisionChan:
    		if rev != expected {
    			t.Fatalf("expected revision %q to be produced on chan, got %q", expected, rev)
    		}
    	case <-time.After(time.Second * 5):
    		t.Fatalf("timed out waiting for value on default revision chan")
    	}
    }
    
    func TestNoDefaultRevision(t *testing.T) {
    	stop := make(chan struct{})
    	client := kube.NewFakeClient()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 23 17:46:59 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  9. src/internal/reflectlite/all_test.go

    	{new(chan<- string), "chan<- string"},
    	{new(func(a int8, b int32)), "func(int8, int32)(arg)"},
    	{new(struct {
    		c chan *int32
    		d float32
    	}),
    		"struct { c chan *int32; d float32 }{chan *int32, 0}",
    	},
    	{new(struct{ c func(chan *integer, *int8) }),
    		"struct { c func(chan *reflectlite_test.integer, *int8) }{func(chan *reflectlite_test.integer, *int8)(arg)}",
    	},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 19:26:08 UTC 2023
    - 24.2K bytes
    - Viewed (0)
  10. internal/grid/handlers.go

    // An optional subroute can be given. Multiple entries are joined with '/'.
    func (h *StreamTypeHandler[Payload, Req, Resp]) RegisterNoPayload(m *Manager, handle func(ctx context.Context, in <-chan Req, out chan<- Resp) *RemoteErr, subroute ...string) error {
    	h.WithPayload = false
    	return h.register(m, func(ctx context.Context, p Payload, in <-chan Req, out chan<- Resp) *RemoteErr {
    		return handle(ctx, in, out)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 27.1K bytes
    - Viewed (0)
Back to top