Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for WithContext (0.27 sec)

  1. okhttp-coroutines/src/test/kotlin/okhttp3/SuspendCallTest.kt

    import kotlinx.coroutines.coroutineScope
    import kotlinx.coroutines.job
    import kotlinx.coroutines.supervisorScope
    import kotlinx.coroutines.test.runTest
    import kotlinx.coroutines.withContext
    import kotlinx.coroutines.withTimeout
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import mockwebserver3.SocketPolicy.DisconnectAfterRequest
    import okhttp3.HttpUrl.Companion.toHttpUrl
    Plain Text
    - Registered: Fri Apr 12 11:42:09 GMT 2024
    - Last Modified: Fri Apr 05 11:25:23 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  2. okhttp-coroutines/src/test/kotlin/okhttp3/coroutines/ExecuteAsyncTest.kt

    import kotlinx.coroutines.coroutineScope
    import kotlinx.coroutines.job
    import kotlinx.coroutines.supervisorScope
    import kotlinx.coroutines.test.runTest
    import kotlinx.coroutines.withContext
    import kotlinx.coroutines.withTimeout
    import mockwebserver3.MockResponse
    import mockwebserver3.MockWebServer
    import mockwebserver3.SocketPolicy.DisconnectAfterRequest
    import okhttp3.Callback
    import okhttp3.FailingCall
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:24:38 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/publicsuffix/PublicSuffixListGenerator.kt

      }
    
      private suspend fun updateLocalFile() =
        withContext(Dispatchers.IO) {
          client.newCall(request).executeAsync().use { response ->
            fileSystem.sink(publicSuffixListDotDat).buffer().use { sink ->
              sink.writeAll(response.body.source())
            }
          }
        }
    
      private suspend fun readImportResults(): ImportResults =
        withContext(Dispatchers.IO) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:24:38 GMT 2024
    - 6K bytes
    - Viewed (0)
  4. istioctl/pkg/wait/wait.go

    			ctx, cancel := context.WithTimeout(context.Background(), timeout)
    			defer cancel()
    			if generation == "" {
    				w = getAndWatchResource(ctx, cliCtx) // setup version getter from kubernetes
    			} else {
    				w = withContext(ctx)
    				w.Go(func(result chan string) error {
    					result <- generation
    					return nil
    				})
    			}
    			// wait for all deployed versions to be contained in generations
    			t := time.NewTicker(pollInterval)
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Sat Feb 17 12:24:17 GMT 2024
    - 10.1K bytes
    - Viewed (0)
  5. tests/prepared_stmt_test.go

    		t.Fatalf("should assign PreparedStatement Manager back to database when using PrepareStmt mode")
    	}
    
    	ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond)
    	defer cancel()
    	txCtx := tx.WithContext(ctx)
    
    	user := *GetUser("prepared_stmt", Config{})
    
    	txCtx.Create(&user)
    
    	var result1 User
    	if err := txCtx.Find(&result1, user.ID).Error; err != nil {
    		t.Fatalf("no error should happen but got %v", err)
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 21 07:55:43 GMT 2024
    - 4K bytes
    - Viewed (0)
  6. internal/rest/client.go

    		Method:     http.MethodPost,
    		URL:        &u,
    		Proto:      "HTTP/1.1",
    		ProtoMajor: 1,
    		ProtoMinor: 1,
    		Header:     make(http.Header),
    		Body:       rc,
    		Host:       u.Host,
    	}
    	req = req.WithContext(ctx)
    	if body != nil {
    		switch v := body.(type) {
    		case *bytes.Buffer:
    			req.ContentLength = int64(v.Len())
    			buf := v.Bytes()
    			req.GetBody = func() (io.ReadCloser, error) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14K bytes
    - Viewed (0)
  7. cmd/admin-router.go

    	handlerName := getHandlerName(f, "adminAPIHandlers")
    
    	var handler http.HandlerFunc = func(w http.ResponseWriter, r *http.Request) {
    		// Update request context with `logger.ReqInfo`.
    		r = r.WithContext(newContext(r, w, handlerName))
    
    		defer logger.AuditLog(r.Context(), w, r, mustGetClaimsFromToken(r))
    
    		// Check if object layer is available, if not return error early.
    		if !handlerFlags.Has(noObjLayerFlag) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Mar 10 21:09:36 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  8. CHANGELOG/CHANGELOG-1.27.md

    - Callers of `wait.ExponentialBackoffWithContext` now must pass a `ConditionWithContextFunc` to be consistent with the signature and avoid creating a duplicate context. If your condition does not need a context you can use the `ConditionFunc.WithContext()` helper to ignore the context, or use `ExponentialBackoff` directly. ([#115113](https://github.com/kubernetes/kubernetes/pull/115113), [@smarterclayton](https://github.com/smarterclayton))
    Plain Text
    - Registered: Fri May 03 09:05:14 GMT 2024
    - Last Modified: Tue Apr 16 15:20:21 GMT 2024
    - 434.3K bytes
    - Viewed (3)
Back to top