Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 922 for Await (0.13 sec)

  1. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

        // Cause acceptConnections() to break out.
        serverSocket.close()
    
        // Await shutdown.
        for (queue in taskRunner.activeQueues()) {
          if (!queue.idleLatch().await(5, TimeUnit.SECONDS)) {
            throw IOException("Gave up waiting for queue to shut down")
          }
        }
        taskRunnerBackend.shutdown()
      }
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 37.4K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/fess/exec/SuggestCreator.java

                    logger.error("Failed to update suggest index.", t);
                    exitCode.set(1);
                    latch.countDown();
                });
    
                try {
                    latch.await();
                } catch (final InterruptedException ignore) {
                    if (logger.isDebugEnabled()) {
                        logger.debug("Interrupted.", ignore);
                    }
                    exitCode.set(1);
    Registered: Wed Jun 12 13:08:18 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 10K bytes
    - Viewed (0)
  3. docs/ru/docs/tutorial/testing.md

    {!../../../docs_src/app_testing/tutorial001.py!}
    ```
    
    !!! tip "Подсказка"
        Обратите внимание, что тестирующая функция является обычной `def`, а не асинхронной `async def`.
    
        И вызов клиента также осуществляется без `await`.
    
        Это позволяет вам использовать `pytest` без лишних усложнений.
    
    !!! note "Технические детали"
        Также можно написать `from starlette.testclient import TestClient`.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  4. docs/fa/docs/index.md

    async def read_item(item_id: int, q: Optional[str] = None):
        return {"item_id": item_id, "q": q}
    ```
    
    **توجه**:
    
    اگر با `async / await` آشنا نیستید، به بخش _"عجله‌ دارید?"_ در صفحه درباره <a href="https://fastapi.tiangolo.com/async/#in-a-hurry" target="_blank">`async` و `await` در مستندات</a> مراجعه کنید.
    
    
    </details>
    
    ### اجرا کنید
    
    با استفاده از دستور زیر سرور را اجرا کنید:
    
    <div class="termy">
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 23:58:47 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  5. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

        val entryTime = System.nanoTime()
    
        for (queue in TaskRunner.INSTANCE.activeQueues()) {
          // We wait at most 1 second, so we don't ever turn multiple lost threads into
          // a test timeout failure.
          val waitTime = (entryTime + 1_000_000_000L - System.nanoTime())
          if (!queue.idleLatch().await(waitTime, TimeUnit.NANOSECONDS)) {
            TaskRunner.INSTANCE.lock.withLock {
              TaskRunner.INSTANCE.cancelAll()
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

        afterStarted.countDown();
        // We do not call awaitHealthy because, due to races, that method may throw an exception.  But
        // we really just want to wait for the thread to be in the failure callback so we wait for that
        // explicitly instead.
        failEnter.await();
        assertFalse("State should be updated before calling listeners", manager.isHealthy());
        // now we want to stop the services.
        Thread stoppingThread =
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Oct 02 17:20:27 UTC 2023
    - 23.9K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

        afterStarted.countDown();
        // We do not call awaitHealthy because, due to races, that method may throw an exception.  But
        // we really just want to wait for the thread to be in the failure callback so we wait for that
        // explicitly instead.
        failEnter.await();
        assertFalse("State should be updated before calling listeners", manager.isHealthy());
        // now we want to stop the services.
        Thread stoppingThread =
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Oct 02 17:20:27 UTC 2023
    - 23.2K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt

          assertEquals(cancelMode == INTERRUPT, Thread.interrupted())
        }
        responseBody.close()
        assertEquals(if (connectionType == H2) 1 else 0, client.connectionPool.connectionCount())
    
        cancelLatch.await()
    
        val events = listener.eventSequence.filter { isConnectionEvent(it) }.map { it.name }
        listener.clearAllEvents()
    
        assertThat(events).startsWith("CallStart", "ConnectStart", "ConnectEnd", "ConnectionAcquired")
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  9. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

              ) {
                processResponse(response, hostname, responses, failures)
                latch.countDown()
              }
            },
          )
        }
    
        try {
          latch.await()
        } catch (e: InterruptedException) {
          failures.add(e)
        }
      }
    
      private fun processResponse(
        response: Response,
        hostname: String,
        results: MutableList<InetAddress>,
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Fri Mar 22 07:09:21 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  10. docs/uk/docs/index.md

        return {"item_id": item_id, "q": q}
    ```
    
    <details markdown="1">
    <summary>Або використайте <code>async def</code>...</summary>
    
    Якщо ваш код використовує `async` / `await`, скористайтеся `async def`:
    
    ```Python hl_lines="9  14"
    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    async def read_root():
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Mon Apr 29 05:18:04 UTC 2024
    - 24.2K bytes
    - Viewed (0)
Back to top