Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 980 for Await (0.04 sec)

  1. platforms/core-runtime/messaging/src/main/java/org/gradle/internal/dispatch/AsyncDispatch.java

            lock.lock();
            try {
                boolean interrupted = false;
                while (state != State.Stopped && queue.isEmpty()) {
                    try {
                        condition.await();
                    } catch (InterruptedException e) {
                        interrupted = true;
                    }
                }
                if (interrupted) {
                    Thread.currentThread().interrupt();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Dec 11 13:37:56 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  2. tests/test_route_scope.py

    
    @app.websocket("/items/{item_id}")
    async def websocket_item(item_id: str, websocket: WebSocket):
        route: APIWebSocketRoute = websocket.scope["route"]
        await websocket.accept()
        await websocket.send_json({"item_id": item_id, "path": route.path})
    
    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/users/rick")
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Feb 08 10:23:07 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  3. 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)
  4. .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)
  5. 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)
  6. 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)
  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