- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for cancelable (0.06 sec)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/TaskQueue.kt
* * @throws RejectedExecutionException if the queue is shut down and the task is not cancelable. */ fun schedule( task: Task, delayNanos: Long = 0L, ) { taskRunner.withLock { if (shutdown) { if (task.cancelable) { taskRunner.logger.taskLog(task, this) { "schedule canceled (queue is shutdown)" } return }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed May 28 23:28:25 UTC 2025 - 7.3K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/ws/RealWebSocket.kt
// Close the writer on the writer's thread. val writerToClose = this.writer if (writerToClose != null) { this.writer = null taskQueue.execute("$name writer close", cancelable = false) { writerToClose.closeQuietly() } } this.taskQueue.shutdown() } sendOnClosed = !failed && writer == null && receivedCloseCode != -1 }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 21.6K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
boundSocketAddress = InetSocketAddress(boundSocketAddress.address, serverSocket.localPort) } finally { this.socketAddress_ = boundSocketAddress } taskRunner.newQueue().execute(toString(), cancelable = false) { try { logger.fine("$this starting to accept connections") acceptConnections() } catch (e: Throwable) { logger.log(Level.WARNING, "$this failed unexpectedly", e)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 02 20:36:00 UTC 2025 - 40.3K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/AbstractScheduledService.java
delegate.awaitTerminated(timeout, unit); } interface Cancellable { void cancel(boolean mayInterruptIfRunning); boolean isCancelled(); } private static final class FutureAsCancellable implements Cancellable { private final Future<?> delegate; FutureAsCancellable(Future<?> delegate) { this.delegate = delegate; }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 27.8K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java
delegate.awaitTerminated(timeout, unit); } interface Cancellable { void cancel(boolean mayInterruptIfRunning); boolean isCancelled(); } private static final class FutureAsCancellable implements Cancellable { private final Future<?> delegate; FutureAsCancellable(Future<?> delegate) { this.delegate = delegate; }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 27.7K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealConnectionPool.kt
return if (connection.noNewExchanges || maxIdleConnections == 0) { connection.noNewExchanges = true connections.remove(connection) if (connections.isEmpty()) cleanupQueue.cancelAll() scheduleOpener(connection.route.address) true } else { scheduleCloser() false } } fun evictAll() { val i = connections.iterator()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Jun 03 17:10:08 UTC 2025 - 16.1K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/TaskRunner.kt
try { backend.coordinatorWait(this@TaskRunner, minDelayNanos) } catch (_: InterruptedException) { // Will cause all tasks to exit unless more are scheduled! cancelAll() } finally { coordinatorWaiting = false } } } } } /** Start another thread, unless a new thread is already scheduled to start. */
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:30:11 UTC 2025 - 10.4K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt
val waitTime = (entryTime + 1_000_000_000L - System.nanoTime()) if (!queue.idleLatch().await(waitTime, TimeUnit.NANOSECONDS)) { TaskRunner.INSTANCE.withLock { TaskRunner.INSTANCE.cancelAll() } fail<Unit>("Queue still active after 1000 ms") } } } override fun beforeEach(context: ExtensionContext) { testName = context.displayName beforeEach()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri May 30 21:28:20 UTC 2025 - 10.5K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Dispatcher.kt
} /** * Cancel all calls currently enqueued or executing. Includes calls executed both * [synchronously][Call.execute] and [asynchronously][Call.enqueue]. */ @Synchronized fun cancelAll() { for (call in readyAsyncCalls) { call.call.cancel() } for (call in runningAsyncCalls) { call.call.cancel() } for (call in runningSyncCalls) { call.cancel()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed May 28 23:28:25 UTC 2025 - 8.7K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
val runningCalls: List<Call> = dispatcher.runningCalls() val queuedCallsCount: Int = dispatcher.queuedCallsCount() val runningCallsCount: Int = dispatcher.runningCallsCount() dispatcher.cancelAll() } @Test fun dispatcherFromMockWebServer() { val dispatcher = object : okhttp3.mockwebserver.Dispatcher() { override fun dispatch(request: RecordedRequest): MockResponse = TODO()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 46.5K bytes - Viewed (0)