Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of about 10,000 for ctan (0.19 sec)

  1. 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)
  2. test/fixedbugs/issue8011.go

    // run
    
    // Copyright 2014 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    func main() {
    	c := make(chan chan int, 1)
    	c1 := make(chan int, 1)
    	c1 <- 42
    	c <- c1
    	x := <-<-c
    	if x != 42 {
    		println("BUG:", x, "!= 42")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 330 bytes
    - Viewed (0)
  3. test/fixedbugs/bug273.go

    }
    
    func bigcap() {
    	g1 = make([]block, 10, big)
    }
    
    type cblock [1<<16 - 1]byte
    
    var g4 chan cblock
    
    func badchancap() {
    	g4 = make(chan cblock, minus1)
    }
    
    func bigchancap() {
    	g4 = make(chan cblock, big)
    }
    
    func overflowchan() {
    	const ptrSize = unsafe.Sizeof(uintptr(0))
    	g4 = make(chan cblock, 1<<(30*(ptrSize/4)))
    }
    
    func main() {
    	shouldfail(badlen, "badlen")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 26 14:06:28 UTC 2018
    - 1.3K bytes
    - Viewed (0)
  4. src/cmd/gofmt/testdata/typealias.golden

    package q
    
    import "p"
    
    type _ = int
    type a = struct{ x int }
    type b = p.B
    
    type (
    	_  = chan<- int
    	aa = interface{}
    	bb = p.BB
    )
    
    // TODO(gri) We may want to put the '=' into a separate column if
    // we have mixed (regular and alias) type declarations in a group.
    type (
    	_   chan<- int
    	_   = chan<- int
    	aa0 interface{}
    	aaa = interface{}
    	bb0 p.BB
    	bbb = p.BB
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 10 00:09:48 UTC 2017
    - 365 bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/plugin/pkg/audit/buffered/buffered_test.go

    }
    
    func TestBufferedBackendShutdownWaitsForDelegatedCalls(t *testing.T) {
    	t.Parallel()
    
    	delegatedCallStartCh := make(chan struct{})
    	delegatedCallEndCh := make(chan struct{})
    	delegateBackend := &fake.Backend{
    		OnRequest: func(_ []*auditinternal.Event) {
    			close(delegatedCallStartCh)
    			<-delegatedCallEndCh
    		},
    	}
    	config := testBatchConfig()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 14 17:20:35 UTC 2018
    - 5.9K bytes
    - Viewed (0)
  6. test/ken/cplx5.go

    	if a[5] != 5-5i {
    		panic(a[5])
    	}
    
    	// slice of complex128
    	s = make([]complex128, len(a))
    	for i := 0; i < len(s); i++ {
    		s[i] = a[i]
    	}
    	if s[5] != 5-5i {
    		panic(s[5])
    	}
    
    	// chan
    	c = make(chan complex128)
    	go chantest(c)
    	vc := <-c
    	if vc != 5-5i {
    		panic(vc)
    	}
    
    	// pointer of complex128
    	v := a[5]
    	pv := &v
    	if *pv != 5-5i {
    		panic(*pv)
    	}
    
    	// field of complex128
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 24 05:24:24 UTC 2012
    - 1.1K bytes
    - Viewed (0)
  7. src/runtime/race/testdata/sync_test.go

    		x = 1
    	})
    	defer timer.Stop()
    }
    
    func TestNoRaceAfterFunc3(t *testing.T) {
    	c := make(chan bool, 1)
    	x := 0
    	_ = x
    	time.AfterFunc(1e7, func() {
    		x = 1
    		c <- true
    	})
    	<-c
    }
    
    func TestRaceAfterFunc3(t *testing.T) {
    	c := make(chan bool, 2)
    	x := 0
    	_ = x
    	time.AfterFunc(1e7, func() {
    		x = 1
    		c <- true
    	})
    	time.AfterFunc(2e7, func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 10 15:05:17 UTC 2020
    - 3K bytes
    - Viewed (0)
  8. 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)
  9. staging/src/k8s.io/apiserver/pkg/server/signal.go

    	"os/signal"
    )
    
    var onlyOneSignalHandler = make(chan struct{})
    var shutdownHandler chan os.Signal
    
    // SetupSignalHandler registered for SIGTERM and SIGINT. A stop channel is returned
    // which is closed on one of these signals. If a second signal is caught, the program
    // is terminated with exit code 1.
    // Only one of SetupSignalContext and SetupSignalHandler should be called, and only can
    // be called once.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 06 14:30:27 UTC 2020
    - 2K bytes
    - Viewed (0)
  10. 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)
Back to top