- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 75 for executor (0.16 sec)
-
okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt
private var writer = Http2Writer(bytesOut, client) private val outFrames: MutableList<OutFrame> = ArrayList() private val inFrames: BlockingQueue<InFrame> = LinkedBlockingQueue() private var port = 0 private val executor = Executors.newSingleThreadExecutor(threadFactory("MockHttp2Peer")) private var serverSocket: ServerSocket? = null private var socket: Socket? = null fun setClient(client: Boolean) { if (this.client == client) return
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 8.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt
} eventListener.canceled(this) } override fun isCanceled(): Boolean = canceled override fun execute(): Response { check(executed.compareAndSet(false, true)) { "Already Executed" } timeout.enter() callStart() try { client.dispatcher.executed(this) return getResponseWithInterceptorChain() } finally { client.dispatcher.finished(this) } }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 17.9K bytes - Viewed (2) -
regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt
.build() @After fun tearDown() { engine.shutdown() cacheDir.deleteRecursively() } @Test fun get() { val executor = Executors.newCachedThreadPool() val completableFuture = execute(engine, executor, "https://google.com/robots.txt") try { val response = completableFuture.get(10, TimeUnit.SECONDS) assertEquals(200, response.code)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 24 13:19:43 GMT 2024 - 6.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DispatcherTest.kt
dispatcher.maxRequestsPerHost = 4 executor.assertJobs("http://a/1", "http://a/2", "http://a/3", "http://a/4") } @Test fun oldJobFinishesNewJobCanRunDifferentHost() { dispatcher.maxRequests = 1 client.newCall(newRequest("http://a/1")).enqueue(callback) client.newCall(newRequest("http://b/1")).enqueue(callback) executor.finishJob("http://a/1") executor.assertJobs("http://b/1") } @Test
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Apr 05 03:30:42 GMT 2024 - 12.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt
class RelayTest { @TempDir var tempDir: File? = null private val executor = Executors.newCachedThreadPool(threadFactory("RelayTest")) private val metadata: ByteString = "great metadata!".encodeUtf8() private lateinit var file: File @BeforeEach fun setUp() { file = File(tempDir, "test") } @AfterEach fun tearDown() { executor.shutdown() } @Test fun singleSource() {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 8.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/SocksProxy.kt
*/ class SocksProxy { private val executor = Executors.newCachedThreadPool(threadFactory("SocksProxy")) private var serverSocket: ServerSocket? = null private val connectionCount = AtomicInteger() private val openSockets = Collections.newSetFromMap(ConcurrentHashMap<Socket, Boolean>()) fun play() { serverSocket = ServerSocket(0) executor.execute { val threadName = "SocksProxy ${serverSocket!!.localPort}"
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 7.7K bytes - Viewed (0) -
okhttp-android/src/test/kotlin/okhttp3/android/ShadowDnsResolver.kt
val flags: Int, val callback: DnsResolver.Callback<List<InetAddress>>, ) @Implementation fun query( network: Network?, domain: String, nsType: Int, flags: Int, executor: Executor, cancellationSignal: CancellationSignal?, callback: DnsResolver.Callback<List<InetAddress>>, ) { responder(Request(network, domain, nsType, flags, callback)) } companion object {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 22 20:07:09 GMT 2024 - 1.7K bytes - Viewed (1) -
okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 29 00:33:04 GMT 2024 - 10.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskQueue.kt
/** * Returns a snapshot of tasks currently scheduled for execution. Does not include the * currently-executing task unless it is also scheduled for future execution. */ val scheduledTasks: List<Task> get() = taskRunner.lock.withLock { futureTasks.toList() } /** * Schedules [task] for execution in [delayNanos]. A task may only have one future execution
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 7.5K bytes - Viewed (0) -
okhttp-android/src/main/kotlin/okhttp3/android/AndroidAsyncDns.kt
internal val resolver = DnsResolver.getInstance() private val executor = Executors.newSingleThreadExecutor() override fun query( hostname: String, callback: AsyncDns.Callback, ) { try { resolver.query( network, hostname, dnsClass.type, DnsResolver.FLAG_EMPTY, executor, null, object : DnsResolver.Callback<List<InetAddress>> {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 01 10:07:48 GMT 2024 - 2.8K bytes - Viewed (0)