- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for withContext (0.22 sec)
-
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) -
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) -
build-logic/binary-compatibility/src/test/groovy/gradlebuild/binarycompatibility/PublicAPIRulesTest.groovy
given: JApiCompatibility jApiType = getProperty(jApiTypeName) def incubatingMissingRule = withContext(new IncubatingMissingRule([:])) def sinceMissingRule = withContext(new SinceAnnotationMissingRule([:])) when: jApiType.annotations >> [deprecatedAnnotation] sourceFile.text = """ @Deprecated
Groovy - Registered: Wed May 01 11:36:15 GMT 2024 - Last Modified: Fri Dec 01 20:12:19 GMT 2023 - 16K bytes - Viewed (0) -
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) -
internal/event/target/elasticsearch.go
resp, err := c.Ping( c.Ping.WithContext(ctx), ) if err != nil { return false, store.ErrNotConnected } xhttp.DrainBody(resp.Body) return !resp.IsError(), nil } func (c *esClientV7) entryExists(ctx context.Context, index string, key string) (bool, error) { res, err := c.Exists( index, key, c.Exists.WithContext(ctx), ) if err != nil { return false, err }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 15K bytes - Viewed (0) -
internal/rest/rpc-stats.go
}, ConnectDone: func(network, addr string, err error) { if err == nil { atomic.StoreInt64(&dialEnd, time.Now().UnixNano()) } }, } return req.WithContext(httptrace.WithClientTrace(req.Context(), trace)), func() { if ds := atomic.LoadInt64(&dialStart); ds > 0 { if de := atomic.LoadInt64(&dialEnd); de == 0 { atomic.AddUint64(&globalStats.tcpDialErrs, 1)
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Sep 29 16:27:58 GMT 2022 - 2.3K bytes - Viewed (0) -
gorm.go
if config.NowFunc != nil { tx.Config.NowFunc = config.NowFunc } if config.Initialized { tx = tx.getInstance() } return tx } // WithContext change current instance db's context to ctx func (db *DB) WithContext(ctx context.Context) *DB { return db.Session(&Session{Context: ctx}) } // Debug start debug mode func (db *DB) Debug() (tx *DB) { tx = db.getInstance()
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sun Aug 20 11:46:56 GMT 2023 - 11.6K bytes - Viewed (0) -
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 08 22:53:08 GMT 2024 - Last Modified: Sat Feb 17 12:24:17 GMT 2024 - 10.1K bytes - Viewed (0) -
okhttp-coroutines/README.md
OkHttp Coroutines ================= Support for Kotlin clients using coroutines. ```kotlin val call = client.newCall(request) call.executeAsync().use { response -> withContext(Dispatchers.IO) { println(response.body?.string()) } } ``` This is implemented using `suspendCancellableCoroutine` but uses the standard Dispatcher in OkHttp. This means that by default Kotlin's Dispatchers are not used.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Nov 09 15:47:27 GMT 2023 - 609 bytes - Viewed (0) -
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 May 05 09:35:13 GMT 2024 - Last Modified: Thu Mar 21 07:55:43 GMT 2024 - 4K bytes - Viewed (0)