- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 197 for yield4x (0.09 sec)
-
okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt
* Runs a [TaskRunner] in a controlled environment so that everything is sequential and * deterministic. * * This class ensures that at most one thread is running at a time. This is initially the JUnit test * thread, which yields its execution privilege while calling [runTasks], [runNextTask], or * [advanceUntil]. These functions don't return until the task threads are all idle. * * Task threads release their execution privilege in these ways: *
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Apr 29 00:33:04 UTC 2024 - 12.6K bytes - Viewed (0) -
src/reflect/iter.go
break } return func(yield func(Value) bool) { v = v.Elem() for i := range v.Len() { if !yield(ValueOf(i)) { return } } } case Array, Slice: return func(yield func(Value) bool) { for i := range v.Len() { if !yield(ValueOf(i)) { return } } } case String: return func(yield func(Value) bool) { for i := range v.String() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 13:40:11 UTC 2024 - 3.9K bytes - Viewed (0) -
src/runtime/race/testdata/rangefunc_test.go
"testing" ) type Seq2[T1, T2 any] func(yield func(T1, T2) bool) // ofSliceIndex returns a Seq over the elements of s. It is equivalent // to range s, except that it splits s into two halves and iterates // in two separate goroutines. This is racy if yield is racy, and yield // will be racy if it contains an early exit. func ofSliceIndex[T any, S ~[]T](s S) Seq2[int, T] { return func(yield func(int, T) bool) { c := make(chan bool, 2)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 21:08:03 UTC 2024 - 1.8K bytes - Viewed (0) -
src/runtime/testdata/testprog/coro.go
return nil } func iterSimple(yield func(int) bool) { for range 3 { if !yield(5) { return } } } func iterNested(yield func(int) bool) { next, stop := iter.Pull(iterSimple) for { v, ok := next() if ok { if !yield(v) { stop() } } else { return } } } func iterLock(yield func(int) bool) { for range 3 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 19:46:10 UTC 2024 - 3.6K bytes - Viewed (0) -
src/iter/pull_test.go
import ( "fmt" . "iter" "runtime" "testing" ) func count(n int) Seq[int] { return func(yield func(int) bool) { for i := range n { if !yield(i) { break } } } } func squares(n int) Seq2[int, int64] { return func(yield func(int, int64) bool) { for i := range n { if !yield(i, int64(i)*int64(i)) { break } } } } func TestPull(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 19:09:28 UTC 2024 - 10.2K bytes - Viewed (0) -
src/iter/iter.go
// When called as seq(yield), seq calls yield(v) for each value v in the sequence, // stopping early if yield returns false. type Seq[V any] func(yield func(V) bool) // Seq2 is an iterator over sequences of pairs of values, most commonly key-value pairs. // When called as seq(yield), seq calls yield(k, v) for each pair (k, v) in the sequence, // stopping early if yield returns false.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 19:09:28 UTC 2024 - 6.6K bytes - Viewed (0) -
src/runtime/testdata/testprogcgo/coro.go
}) return err } func iterSimple(yield func(int) bool) { for range 3 { if !yield(5) { return } } } func iterNested(yield func(int) bool) { next, stop := iter.Pull(iterSimple) for { v, ok := next() if ok { if !yield(v) { stop() } } else { return } } } func iterCallback(yield func(int) bool) { for range 3 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 19:46:10 UTC 2024 - 3.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/ir/tfl_ops.cc
if (!control_node.GetBody().args_empty()) return control_node.emitOpError() << "expects body without any arguments"; Operation& yield = control_node.GetBody().back(); if (!isa<YieldOp>(yield)) return yield.emitOpError() << "invalid TFL.control_node terminator, yield expected"; // Ensure that the terminator's operands and the control_node results match in // types. const int result_count =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 09:41:17 UTC 2024 - 169.2K bytes - Viewed (0) -
src/maps/iter.go
return func(yield func(K, V) bool) { for k, v := range m { if !yield(k, v) { return } } } } // Keys returns an iterator over keys in m. // The iteration order is not specified and is not guaranteed // to be the same from one call to the next. func Keys[Map ~map[K]V, K comparable, V any](m Map) iter.Seq[K] { return func(yield func(K) bool) { for k := range m {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 13:41:45 UTC 2024 - 1.6K bytes - Viewed (0) -
src/slices/iter.go
return func(yield func(int, E) bool) { for i, v := range s { if !yield(i, v) { return } } } } // Backward returns an iterator over index-value pairs in the slice, // traversing it backward. The indexes range from len(s)-1 down to 0. func Backward[Slice ~[]E, E any](s Slice) iter.Seq2[int, E] { return func(yield func(int, E) bool) { for i := len(s) - 1; i >= 0; i-- {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:40:32 UTC 2024 - 2.9K bytes - Viewed (0)