Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 2,050 for Await (0.03 sec)

  1. fastapi/datastructures.py

            To be awaitable, compatible with async, this is run in threadpool.
            """
            return await super().seek(offset)
    
        async def close(self) -> None:
            """
            Close the file.
    
            To be awaitable, compatible with async, this is run in threadpool.
            """
            return await super().close()
    
        @classmethod
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Apr 02 02:48:51 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. .github/workflows/trusted_partners.js

      }
    
      const resp_label = await github.rest.issues.addLabels({
        issue_number: context.issue.number,
        owner: context.repo.owner,
        repo: context.repo.repo,
        labels: labels
      });
      if (resp_label.status >= 400) {
        console.log(resp_label);
        throw "Error adding labels to PR";
      }
      if (assignees.length > 0) {
        const resp_assign = await github.rest.issues.addAssignees({
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Feb 07 13:52:04 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java

        assertFalse(service.startUpCalled);
    
        service.startAsync().awaitRunning();
        assertTrue(service.startUpCalled);
        assertEquals(Service.State.RUNNING, service.state());
    
        enterRun.await(); // to avoid stopping the service until run() is invoked
    
        service.stopAsync().awaitTerminated();
        assertTrue(service.shutDownCalled);
        assertEquals(Service.State.TERMINATED, service.state());
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 12.7K bytes
    - Viewed (0)
  4. pkg/queue/delay.go

    					await.Stop()
    					return
    				}
    				await.Stop()
    			}
    		} else {
    			// no items, wait for Push or stop
    			select {
    			case t := <-d.enqueue:
    				d.mu.Lock()
    				d.queue.Push(t)
    				d.mu.Unlock()
    			case <-stop:
    				return
    			}
    		}
    	}
    }
    
    // work takes a channel that signals to stop, and returns a channel that signals the worker has fully stopped
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jul 20 06:27:31 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/AutobahnTester.kt

              t: Throwable,
              response: Response?,
            ) {
              t.printStackTrace(System.out)
              latch.countDown()
            }
          },
        )
    
        check(latch.await(30, TimeUnit.SECONDS)) { "Timed out waiting for test $number to finish." }
        val endNanos = System.nanoTime()
        val tookMs = TimeUnit.NANOSECONDS.toMillis(endNanos - startNanos.get())
        println("Took ${tookMs}ms")
      }
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  6. docs/zh/docs/async.md

    # 并发 async / await
    
    有关路径操作函数的 `async def` 语法以及异步代码、并发和并行的一些背景知识。
    
    ## 赶时间吗?
    
    <abbr title="too long; didn't read(长文警告)"><strong>TL;DR:</strong></abbr>
    
    如果你正在使用第三方库,它们会告诉你使用 `await` 关键字来调用它们,就像这样:
    
    ```Python
    results = await some_library()
    ```
    
    然后,通过 `async def` 声明你的 *路径操作函数*:
    
    ```Python hl_lines="2"
    @app.get('/')
    async def read_results():
        results = await some_library()
        return results
    ```
    
    !!! note
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  7. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/work/AbstractConditionalExecution.java

        }
    
        @Override
        public Runnable getExecution() {
            return runnable;
        }
    
        @Override
        public T await() {
            boolean interrupted = false;
            while (true) {
                try {
                    finished.await();
                    break;
                } catch (InterruptedException e) {
                    cancel();
                    interrupted = true;
                }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  8. platforms/core-runtime/launcher/src/main/java/org/gradle/tooling/internal/provider/continuous/ContinuousBuildTriggerHandler.java

                return;
            }
            try {
                cancellationToken.addCallback(cancellationHandler);
                notifier.run();
                changeOrCancellationArrived.await();
                while (!cancellationToken.isCancellationRequested()) {
                    Instant now = nowFromMonotonicClock();
                    Instant endOfQuietPeriod = lastChangeAt.plus(quietPeriod);
                    if (!endOfQuietPeriod.isAfter(now)) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 09:29:13 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  9. platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/resolver/KotlinBuildScriptModelRepositoryTest.kt

            val (_, asyncResp2) = pendingTasks[1]
            assertThat(
                asyncResp2.await(),
                nullValue()
            )
    
            // only then the most recent request will be given its response
            assertThat(
                asyncRespLast.await(),
                sameInstance(respLast)
            )
    
            // and no other requests are left to process
            assertThat(
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  10. guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

            new Object() {
              @Override
              protected void finalize() {
                latch.countDown();
              }
            };
        x = null; // Hint to the JIT that x is unreachable
        GcFinalization.await(latch);
        assertEquals(0, latch.getCount());
      }
    
      public void testAwaitDone_Future() {
        final SettableFuture<@Nullable Void> future = SettableFuture.create();
        Object x =
            new Object() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 7.4K bytes
    - Viewed (0)
Back to top