Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 2,181 for Await (0.17 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. platforms/core-execution/persistent-cache/src/main/java/org/gradle/cache/internal/ExclusiveCacheAccessingWorker.java

            @Override
            public void run() {
            }
    
            public void await() {
                try {
                    latch.await();
                } catch (InterruptedException e) {
                    throw UncheckedException.throwAsUncheckedException(e);
                }
            }
    
            public void completed() {
                latch.countDown();
            }
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 16 15:49:50 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  10. platforms/core-runtime/process-services/src/integTest/groovy/org/gradle/process/internal/health/memory/MemoryStatusUpdateIntegrationTest.groovy

                            }
                        })
                        logger.warn "Waiting for memory status events..."
                        osNotification.await()
                        jvmNotification.await()
                    }
                }
            ''').stripIndent()
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Dec 29 14:36:01 UTC 2023
    - 2.8K bytes
    - Viewed (0)
Back to top