- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 230 for isShutdown (0.2 sec)
-
docs_src/events/tutorial002.py
from fastapi import FastAPI app = FastAPI() @app.on_event("shutdown") def shutdown_event(): with open("log.txt", mode="a") as log: log.write("Application shutdown") @app.get("/items/") async def read_items():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 255 bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractIdleServiceTest.java
public void testStop_failed() { final Exception exception = new Exception("deliberate"); TestService service = new TestService() { @Override protected void shutDown() throws Exception { super.shutDown(); throw exception; } }; service.startAsync().awaitRunning(); assertEquals(1, service.startUpCalled); assertEquals(0, service.shutDownCalled);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 7.5K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/Dispatcher.kt
} /** * Release any resources held by this dispatcher. Any requests that are currently being dispatched * should return immediately. Responses returned after shutdown will not be transmitted: their * socket connections have already been closed. */ open fun shutdown() {}
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 1.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java
enterRun.countDown(); try { exitRun.await(); } catch (InterruptedException e) { throw new RuntimeException(e); } } @Override protected void shutDown() { assertTrue(startUpCalled); assertTrue(runCalled); assertFalse(shutDownCalled); shutDownCalled = true; assertEquals(expectedShutdownState, state()); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 12.7K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/AbstractIdleService.java
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; /** * Base class for services that do not need a thread while "running" but may need one during startup * and shutdown. Subclasses can implement {@link #startUp} and {@link #shutDown} methods, each which * run in an executor which by default uses a separate thread for each method. * * @author Chris Nokleberg * @since 1.0 */ @GwtIncompatible @J2ktIncompatible
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Apr 17 13:59:28 UTC 2023 - 5.3K bytes - Viewed (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/QueueDispatcher.kt
throw UnsupportedOperationException("unexpected call") } fun enqueueResponse(response: MockResponse) { delegate.enqueueResponse(response.wrap()) } override fun shutdown() { delegate.shutdown() } fun setFailFast(failFast: Boolean) { delegate.setFailFast(failFast) } fun setFailFast(failFastResponse: MockResponse?) { delegate.setFailFast(failFastResponse?.wrap()) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Oct 18 12:55:43 UTC 2020 - 1.3K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/recipes/WebSocketEcho.java
Request request = new Request.Builder() .url("ws://echo.websocket.org") .build(); client.newWebSocket(request, this); // Trigger shutdown of the dispatcher's executor so this process exits immediately. client.dispatcher().executorService().shutdown(); } @Override public void onOpen(WebSocket webSocket, Response response) { webSocket.send("Hello..."); webSocket.send("...World!");
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Thu Apr 04 11:40:21 UTC 2024 - 1.6K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
server2.start() server2.start() server2.shutdown() } @Test fun shutdownTwice() { val server2 = MockWebServer() server2.start() server2.shutdown() try { server2.start() fail<Unit>() } catch (expected: IllegalStateException) { // Expected. } server2.shutdown() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 23.5K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt
val dispatcher = object : Dispatcher() { override fun dispatch(request: RecordedRequest): MockResponse = TODO() override fun peek(): MockResponse = TODO() override fun shutdown() = TODO() } } @Test @Ignore fun mockResponse() { var mockResponse: MockResponse = MockResponse() var status: String = mockResponse.status status = mockResponse.status
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.3K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/QueueDispatcher.kt
} open fun enqueueResponse(response: MockResponse) { responseQueue.add(response) } open fun clear() { responseQueue.clear() } override fun shutdown() { responseQueue.add(DEAD_LETTER) } open fun setFailFast(failFast: Boolean) { val failFastResponse = if (failFast) { MockResponse(code = HttpURLConnection.HTTP_NOT_FOUND)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Tue Jan 23 14:31:42 UTC 2024 - 3K bytes - Viewed (0)