- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 150 for poll (0.15 sec)
-
okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt
* like [poll]. It is only usable within task faker tasks. */ private inner class TaskFakerBlockingQueue<T>( val delegate: BlockingQueue<T>, ) : AbstractQueue<T>(), BlockingQueue<T> { override val size: Int = delegate.size private var editCount = 0 override fun poll(): T = delegate.poll() override fun poll( timeout: Long, unit: TimeUnit,
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 29 00:33:04 GMT 2024 - 12.6K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/MockStreamHandler.kt
while (true) { val action = actions.poll() ?: break action(stream) } } } return@FutureTask null } } /** Returns once all stream actions complete successfully. */ fun awaitSuccess() { val futureTask = results.poll(5, TimeUnit.SECONDS) ?: throw AssertionError("no onRequest call received")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.2K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/AsyncRequestBody.kt
requestBodySinks.add(sink) } override fun isDuplex(): Boolean = true @Throws(InterruptedException::class) fun takeSink(): BufferedSink { return requestBodySinks.poll(5, SECONDS) ?: throw AssertionError("no sink to take") } fun assertNoMoreSinks() { assertTrue(requestBodySinks.isEmpty()) }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Dec 20 23:27:07 GMT 2023 - 1.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt
return null } private fun awaitTcpConnect( timeout: Long, unit: TimeUnit, ): ConnectResult? { if (tcpConnectsInFlight.isEmpty()) return null val result = connectResults.poll(timeout, unit) ?: return null tcpConnectsInFlight.remove(result.plan) return result } private fun cancelInFlightConnects() { for (plan in tcpConnectsInFlight) { plan.cancel()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 5.8K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceRecorder.kt
} private fun drainCancelQueue(eventSource: EventSource) { if (cancel) { cancel = false eventSource.cancel() } } private fun nextEvent(): Any { return events.poll(10, TimeUnit.SECONDS) ?: throw AssertionError("Timed out waiting for event.") } fun assertExhausted() { assertThat(events).isEmpty() } fun assertEvent( id: String?,
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.1K bytes - Viewed (0) -
doc/next/6-stdlib/1-time.md
making it difficult to use `Reset` and `Stop` correctly. A visible effect of this change is that `len` and `cap` of timer channels now returns 0 instead of 1, which may affect programs that poll the length to decide whether a receive on the timer channel will succeed. Such code should use a non-blocking receive instead. These new behaviors are only enabled when the main Go program
Plain Text - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Fri Apr 12 20:57:18 GMT 2024 - 1.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketRecorder.kt
this.delegate = null delegate.onFailure(webSocket, t, response) } else { events.add(Failure(t, response)) } } private fun nextEvent(): Any { return events.poll(10, TimeUnit.SECONDS) ?: throw AssertionError("Timed out waiting for event.") } fun assertTextMessage(payload: String?) { assertThat(nextEvent()).isEqualTo(Message(string = payload)) }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 6.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/TestLogHandler.kt
} } } } fun takeAll(): List<String> { val list = mutableListOf<String>() logs.drainTo(list) return list } fun take(): String { return logs.poll(10, TimeUnit.SECONDS) ?: throw AssertionError("Timed out waiting for log message.") }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt
synchronized(this@RealWebSocket) { if (failed) { return false // Failed web socket. } writer = this.writer pong = pongQueue.poll() if (pong == null) { messageOrClose = messageAndCloseQueue.poll() if (messageOrClose is Close) { receivedCloseCode = this.receivedCloseCode receivedCloseReason = this.receivedCloseReason
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 01 14:21:25 GMT 2024 - 22.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/connection/FastFallbackExchangeFinderTest.kt
) taskFaker.assertNoMoreTasks() } /** * This test causes two connections to become available simultaneously, one from a TCP connect and * one from the pool. We must take the pooled connection because by taking it from the pool, we've * fully acquired it. * * This test yields threads to force the decision of plan1 to be deliberate and not lucky. In * particular, we set up this sequence of events:
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 24 04:40:49 GMT 2024 - 20.9K bytes - Viewed (0)