- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for backend (0.22 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskLogger.kt
if (loggingEnabled) { startNs = queue.taskRunner.backend.nanoTime() log(task, queue, "starting") } var completedNormally = false try { val result = block() completedNormally = true return result } finally { if (loggingEnabled) { val elapsedNs = queue.taskRunner.backend.nanoTime() - startNs if (completedNormally) {
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt
* This is for the benefit of container environments that implement code unloading. * * Most applications should share a process-wide [TaskRunner] and use queues for per-client work. */ class TaskRunner( val backend: Backend, internal val logger: Logger = TaskRunner.logger, ) { val lock: ReentrantLock = ReentrantLock() val condition: Condition = lock.newCondition() private var nextQueueName = 10000
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 9.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt
isDaemon = true uncaughtExceptionHandler = loggingUncaughtExceptionHandler } } private val backend = TaskRunner.RealBackend(threadFactory) private val taskRunner = TaskRunner(backend) private val queue = taskRunner.newQueue() @AfterEach fun tearDown() { backend.shutdown() } @Test fun test() { val t1 = System.nanoTime() / 1e6
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt
/** * Results are posted here as they occur. The find job is done when either one plan completes * successfully or all plans fail. */ private val connectResults = taskRunner.backend.decorate(LinkedBlockingDeque<ConnectResult>()) override fun find(): RealConnection { var firstException: IOException? = null try { while (tcpConnectsInFlight.isNotEmpty() || routePlanner.hasNext()) {
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 5.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskQueue.kt
internal fun scheduleAndDecide( task: Task, delayNanos: Long, recurrence: Boolean, ): Boolean { task.initQueue(this) val now = taskRunner.backend.nanoTime() val executeNanoTime = now + delayNanos // If the task is already scheduled, take the earlier of the two times. val existingIndex = futureTasks.indexOf(task) if (existingIndex != -1) {
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 7.5K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt
if (isLoom()) { val backend = TaskRunner.RealBackend(loomThreadFactory()) val taskRunner = TaskRunner(backend) OkHttpClient.Builder() .connectionPool( buildConnectionPool( connectionListener = connectionListener, taskRunner = taskRunner, ), ) .dispatcher(Dispatcher(backend.executor)) .taskRunnerInternal(taskRunner)
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.5K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt
* [advanceUntil]. These functions don't return until the task threads are all idle. * * Task threads release their execution privilege in these ways: * * * By yielding in [TaskRunner.Backend.coordinatorWait]. * * By yielding in [BlockingQueue.poll]. * * By completing. */ class TaskFaker : Closeable { @Suppress("NOTHING_TO_INLINE") internal inline fun Any.assertThreadHoldsLock() {
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 12.5K bytes - Viewed (0) -
samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java
import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; import okio.ByteString; /** * Runs a MockWebServer on localhost and uses it as the backend to receive an OAuth session. * * <p>Clients should call {@link #start}, {@link #newAuthorizeUrl} and {@link #close} in that order. * Clients may request multiple sessions. */
Java - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Thu Aug 12 07:26:27 GMT 2021 - 3.8K bytes - Viewed (0) -
okcurl/README.md
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Sat Jul 09 21:19:04 GMT 2016 - 178 bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RequestCommonTest.kt
// TODO check for Jvm or handle Long/long correctly // assertThat(request.tag(Long::class)).isSameAs(longTag) } /** Confirm that we don't accidentally share the backing map between objects. */ @Test fun tagsAreImmutable() { val builder = Request.Builder() .url("https://square.com") val requestA = builder.tag(String::class, "a").build()
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.7K bytes - Viewed (0)