Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 4,361 for chanOf (0.12 sec)

  1. test/typeparam/mdempsky/17.go

    	for k, v = range []V{zero[V]()} {
    	}
    	return
    }
    
    func RangeSliceIface[V iface]() (k any, v iface) {
    	for k, v = range []V{zero[V]()} {
    	}
    	return
    }
    
    func chanOf[T any](elems ...T) chan T {
    	c := make(chan T, len(elems))
    	for _, elem := range elems {
    		c <- elem
    	}
    	close(c)
    	return c
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 10 21:35:49 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  2. src/reflect/type.go

    	m sync.Map
    }
    
    // ChanOf returns the channel type with the given direction and element type.
    // For example, if t represents int, ChanOf(RecvDir, t) represents <-chan int.
    //
    // The gc runtime imposes a limit of 64 kB on channel element types.
    // If t's size is equal to or exceeds this limit, ChanOf panics.
    func ChanOf(dir ChanDir, t Type) Type {
    	typ := t.common()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 85.5K bytes
    - Viewed (0)
  3. src/reflect/all_test.go

    	{struct{ x (chan<- string) }{}, "chan<- string"},
    	{struct{ x (chan<- chan string) }{}, "chan<- chan string"},
    	{struct{ x (chan<- <-chan string) }{}, "chan<- <-chan string"},
    	{struct{ x (<-chan <-chan string) }{}, "<-chan <-chan string"},
    	{struct{ x (chan (<-chan string)) }{}, "chan (<-chan string)"},
    	{struct {
    		x struct {
    			c chan *int32
    			d float32
    		}
    	}{},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. src/runtime/chan.go

    	// operations like close().
    	return unsafe.Pointer(&c.buf)
    }
    
    func racesync(c *hchan, sg *sudog) {
    	racerelease(chanbuf(c, 0))
    	raceacquireg(sg.g, chanbuf(c, 0))
    	racereleaseg(sg.g, chanbuf(c, 0))
    	raceacquire(chanbuf(c, 0))
    }
    
    // Notify the race detector of a send or receive involving buffer entry idx
    // and a channel c or its communicating partner sg.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:50 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  8. platforms/core-execution/execution/src/main/java/org/gradle/internal/execution/history/changes/Change.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package org.gradle.internal.execution.history.changes;
    
    public interface Change {
        String getMessage();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:46:15 UTC 2023
    - 726 bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top