- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 339 for cancel0 (0.16 sec)
-
src/context/context_test.go
defer cancel3() checkNoGoroutine() _, cancel3b := WithCancel(&myDoneCtx{ctx2}) defer cancel3b() checkCreatedGoroutine() // ctx1 is not providing Done, must not be used ctx4, cancel4 := WithTimeout(ctx3, veryLongDuration) defer cancel4() checkNoGoroutine() ctx5, cancel5 := WithCancel(ctx4) defer cancel5() checkNoGoroutine() cancel5() checkNoGoroutine()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 19 19:13:01 UTC 2023 - 7.7K bytes - Viewed (0) -
src/context/afterfunc_test.go
ctx0 := &afterFuncContext{} ctx1, cancel := context.WithTimeout(ctx0, veryLongDuration) defer cancel() ctx0.cancel(context.Canceled) <-ctx1.Done() } func TestCustomContextAfterFuncAfterFunc(t *testing.T) { ctx0 := &afterFuncContext{} donec := make(chan struct{}) stop := context.AfterFunc(ctx0, func() { close(donec) }) defer stop() ctx0.cancel(context.Canceled) <-donec }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 16:58:52 UTC 2023 - 3.4K bytes - Viewed (0) -
src/context/example_test.go
defer cancel1(errors.New("ctx1 canceled")) ctx2, cancel2 := context.WithCancelCause(context.Background()) mergedCtx, mergedCancel := mergeCancel(ctx1, ctx2) defer mergedCancel() cancel2(errors.New("ctx2 canceled")) <-mergedCtx.Done() fmt.Println(context.Cause(mergedCtx)) // Output: // ctx2 canceled
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 21 20:24:28 UTC 2023 - 6.7K bytes - Viewed (0) -
platforms/core-runtime/daemon-protocol/src/main/java/org/gradle/launcher/daemon/protocol/Cancel.java
* See the License for the specific language governing permissions and * limitations under the License. */ package org.gradle.launcher.daemon.protocol; public class Cancel extends Message {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu May 09 04:50:46 UTC 2024 - 702 bytes - Viewed (0) -
src/database/sql/example_service_test.go
// This is a long SELECT. Use the request context as the base of // the context timeout, but give it some time to finish. If // the client cancels before the query is done the query will also // be canceled. ctx, cancel := context.WithTimeout(r.Context(), 60*time.Second) defer cancel() var names []string rows, err := db.QueryContext(ctx, "select p.name from people as p where p.active = true;") if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 28 20:21:26 UTC 2024 - 4K bytes - Viewed (0) -
internal/dsync/drwmutex_test.go
drwm1 := NewDRWMutex(ds, "simplelock") ctx1, cancel1 := context.WithCancel(context.Background()) if !drwm1.GetRLock(ctx1, cancel1, id, source, Options{Timeout: time.Second}) { panic("Failed to acquire read lock") } // fmt.Println("1st read lock acquired, waiting...") drwm2 := NewDRWMutex(ds, "simplelock") ctx2, cancel2 := context.WithCancel(context.Background()) if !drwm2.GetRLock(ctx2, cancel2, id, source, Options{Timeout: time.Second}) {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sat Dec 24 03:49:07 UTC 2022 - 9.7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/sync/errgroup/errgroup.go
// // The derived Context is canceled the first time a function passed to Go // returns a non-nil error or the first time Wait returns, whichever occurs // first. func WithContext(ctx context.Context) (*Group, context.Context) { ctx, cancel := withCancelCause(ctx) return &Group{cancel: cancel}, ctx } // Wait blocks until all function calls from the Go method have returned, then
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:57:25 UTC 2024 - 3.3K bytes - Viewed (0) -
cmd/namespace-lock.go
// LockContext lock context holds the lock backed context and canceler for the context. type LockContext struct { ctx context.Context cancel context.CancelFunc } // Context returns lock context func (l LockContext) Context() context.Context { return l.ctx } // Cancel function calls cancel() function func (l LockContext) Cancel() { if l.cancel != nil { l.cancel() } }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 05 23:56:35 UTC 2023 - 9.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Call.kt
* exception. * * @throws IllegalStateException when the call has already been executed. */ fun enqueue(responseCallback: Callback) /** Cancels the request, if possible. Requests that are already complete cannot be canceled. */ fun cancel() /** * Returns true if this call has been either [executed][execute] or [enqueued][enqueue]. It is an * error to execute a call more than once. */
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 3.6K bytes - Viewed (0) -
internal/grid/stream.go
// Results returns the results from the remote server one by one. // If any error is returned by the callback, the stream will be canceled. // If the context is canceled, the stream will be canceled. func (s *Stream) Results(next func(b []byte) error) (err error) { done := false defer func() { if s.cancel != nil { s.cancel(err) } if !done { // Drain channel. for range s.responses { } } }()
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 3.1K bytes - Viewed (0)