- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,571 for chan2 (0.04 sec)
-
src/internal/fmtsort/sort_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 6.9K bytes - Viewed (0) -
src/go/parser/parser_test.go
{name: "pointer", format: "package main; var x «*»int"}, {name: "func", format: "package main; var x «func()»int", scope: true}, {name: "chan", format: "package main; var x «chan »int"}, {name: "chan2", format: "package main; var x «<-chan »int"}, {name: "interface", format: "package main; var x «interface { M() «int» }»", scope: true, scopeMultiplier: 2}, // Scopes: InterfaceType, FuncType
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 31 20:26:14 UTC 2024 - 24.6K bytes - Viewed (0) -
src/go/parser/testdata/chans.go2
func Ranger[T any]() (*Sender[T], *Receiver[T]) { c := make(chan T) d := make(chan bool) s := &Sender[T]{values: c, done: d} r := &Receiver[T]{values: c, done: d} runtime.SetFinalizer(r, r.finalize) return s, r } // A sender is used to send values to a Receiver. type Sender[T any] struct { values chan<- T done <-chan bool } // Send sends a value to the receiver. It returns whether any more
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 24 19:44:06 UTC 2020 - 1.7K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/testdata/chans.go
func Ranger[T any]() (*Sender[T], *Receiver[T]) { c := make(chan T) d := make(chan bool) s := &Sender[T]{values: c, done: d} r := &Receiver[T]{values: c, done: d} runtime.SetFinalizer(r, r.finalize) return s, r } // A sender is used to send values to a Receiver. type Sender[T any] struct { values chan<- T done <-chan bool } // Send sends a value to the receiver. It returns whether any more
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 30 18:02:18 UTC 2022 - 1.8K bytes - Viewed (0) -
src/internal/types/testdata/check/chans.go
func Ranger[T any]() (*Sender[T], *Receiver[T]) { c := make(chan T) d := make(chan bool) s := &Sender[T]{values: c, done: d} r := &Receiver[T]{values: c, done: d} runtime.SetFinalizer(r, r.finalize) return s, r } // A sender is used to send values to a Receiver. type Sender[T any] struct { values chan<- T done <-chan bool } // Send sends a value to the receiver. It returns whether any more
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 02 02:58:32 UTC 2022 - 1.7K bytes - Viewed (0) -
test/ken/chan.go
randx -= 1000000 } return randx % n } type Chan struct { sc, rc chan int // send and recv chan sv, rv int // send and recv seq } var ( nproc int nprocLock sync.Mutex cval int end int = 10000 totr, tots int totLock sync.Mutex nc *Chan ) func init() { nc = new(Chan) } func changeNproc(adjust int) int { nprocLock.Lock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 24 05:24:24 UTC 2012 - 4.7K bytes - Viewed (0) -
test/typeparam/chans.go
// or the context is canceled, at which point the returned channel is closed. func _Merge[Elem any](ctx context.Context, c1, c2 <-chan Elem) <-chan Elem { r := make(chan Elem) go func(ctx context.Context, c1, c2 <-chan Elem, r chan<- Elem) { defer close(r) for c1 != nil || c2 != nil { select { case <-ctx.Done(): return case v1, ok := <-c1: if ok { r <- v1
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 8.4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/chan.go
func NewChan(dir ChanDir, elem Type) *Chan { return &Chan{dir: dir, elem: elem} } // Dir returns the direction of channel c. func (c *Chan) Dir() ChanDir { return c.dir } // Elem returns the element type of channel c. func (c *Chan) Elem() Type { return c.elem } func (c *Chan) Underlying() Type { return c }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 01 22:17:50 UTC 2021 - 910 bytes - Viewed (0) -
test/ken/chan1.go
const W = 2 // channel buffering var h [N]int // marking of send/recv func r(c chan int, m int) { for { select { case r := <-c: if h[r] != 1 { println("r", "m=", m, "r=", r, "h=", h[r]) panic("fail") } h[r] = 2 } } } func s(c chan int) { for n := 0; n < N; n++ { r := n if h[r] != 0 { println("s") panic("fail") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 24 21:47:04 UTC 2012 - 879 bytes - Viewed (0) -
src/go/types/chan.go
func NewChan(dir ChanDir, elem Type) *Chan { return &Chan{dir: dir, elem: elem} } // Dir returns the direction of channel c. func (c *Chan) Dir() ChanDir { return c.dir } // Elem returns the element type of channel c. func (c *Chan) Elem() Type { return c.elem } func (c *Chan) Underlying() Type { return c }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 1K bytes - Viewed (0)