Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for startCoroutine (0.17 sec)

  1. platforms/core-configuration/graph-serialization/src/main/kotlin/org/gradle/internal/serialize/graph/Running.kt

        runToCompletion {
            writeOperation()
        }
    
    
    /**
     * [Starts][startCoroutine] the suspending [block], asserts it runs
     * to completion and returns its result.
     */
    private
    fun <R> runToCompletion(block: suspend () -> R): R {
        var completion: Result<R>? = null
        block.startCoroutine(
            Continuation(EmptyCoroutineContext) {
                completion = it
            }
        )
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 22 20:48:51 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  2. platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/concurrent/future.kt

    import java.util.concurrent.TimeoutException
    
    import kotlin.coroutines.Continuation
    import kotlin.coroutines.CoroutineContext
    import kotlin.coroutines.EmptyCoroutineContext
    import kotlin.coroutines.startCoroutine
    
    
    /**
     * Starts and exposes the given suspending [computation] as a [Future] value.
     *
     * The [computation] executes synchronously until its first suspension point.
     */
    internal
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  3. platforms/core-configuration/graph-serialization/src/main/kotlin/org/gradle/internal/serialize/graph/Combinators.kt

    import java.io.ObjectInputStream
    import java.io.ObjectOutputStream
    import kotlin.coroutines.Continuation
    import kotlin.coroutines.CoroutineContext
    import kotlin.coroutines.coroutineContext
    import kotlin.coroutines.startCoroutine
    import kotlin.coroutines.suspendCoroutine
    
    
    fun <T> singleton(value: T): Codec<T> =
        SingletonCodec(value)
    
    
    fun <T> codec(
        encode: suspend WriteContext.(T) -> Unit,
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon May 27 12:59:39 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  4. src/cmd/go/internal/trace/trace.go

    	})
    	ctx = context.WithValue(ctx, traceKey{}, traceContext{tc.t, tc.tid})
    	return ctx, childSpan
    }
    
    // StartGoroutine associates the context with a new Thread ID. The Chrome trace viewer associates each
    // trace event with a thread, and doesn't expect events with the same thread id to happen at the
    // same time.
    func StartGoroutine(ctx context.Context) context.Context {
    	tc, ok := getTraceContext(ctx)
    	if !ok {
    		return ctx
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 20:45:06 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  5. src/cmd/go/internal/modload/query.go

    		QueryResult
    		err error
    	}
    	results := make([]result, len(candidateModules))
    	var wg sync.WaitGroup
    	wg.Add(len(candidateModules))
    	for i, p := range candidateModules {
    		ctx := trace.StartGoroutine(ctx)
    		go func(p string, r *result) {
    			r.QueryResult, r.err = queryModule(ctx, p)
    			wg.Done()
    		}(p, &results[i])
    	}
    	wg.Wait()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 11 22:29:11 UTC 2023
    - 44.7K bytes
    - Viewed (0)
  6. src/cmd/go/internal/work/exec.go

    	// deterministic and because there is no real work anyway.
    	par := cfg.BuildP
    	if cfg.BuildN {
    		par = 1
    	}
    	for i := 0; i < par; i++ {
    		wg.Add(1)
    		go func() {
    			ctx := trace.StartGoroutine(ctx)
    			defer wg.Done()
    			for {
    				select {
    				case _, ok := <-b.readySema:
    					if !ok {
    						return
    					}
    					// Receiving a value from b.readySema entitles
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 14:46:37 UTC 2024
    - 105.6K bytes
    - Viewed (0)
Back to top