- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 857 for callable (0.06 sec)
-
guava/src/com/google/common/util/concurrent/Callables.java
Callable<T> callable, ListeningExecutorService listeningExecutorService) { checkNotNull(callable); checkNotNull(listeningExecutorService); return () -> listeningExecutorService.submit(callable); } /** * Wraps the given callable such that for the duration of {@link Callable#call} the thread that is * running will have the given name. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri May 12 18:32:03 UTC 2023 - 4.4K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Callables.java
Callable<T> callable, ListeningExecutorService listeningExecutorService) { checkNotNull(callable); checkNotNull(listeningExecutorService); return () -> listeningExecutorService.submit(callable); } /** * Wraps the given callable such that for the duration of {@link Callable#call} the thread that is * running will have the given name. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri May 12 18:32:03 UTC 2023 - 4.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/CallablesTest.java
Callable<@Nullable Void> callable = new Callable<@Nullable Void>() { @Override public @Nullable Void call() throws Exception { assertEquals(Thread.currentThread().getName(), newName.get()); return null; } }; Callables.threadRenaming(callable, newName).call();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 5.5K bytes - Viewed (0) -
docs_src/custom_request_and_route/tutorial001.py
import gzip from typing import Callable, List from fastapi import Body, FastAPI, Request, Response from fastapi.routing import APIRoute class GzipRequest(Request): async def body(self) -> bytes: if not hasattr(self, "_body"): body = await super().body() if "gzip" in self.headers.getlist("Content-Encoding"): body = gzip.decompress(body) self._body = body return self._body
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 973 bytes - Viewed (0) -
fastapi/encoders.py
set: list, UUID: str, Url: str, AnyUrl: str, } def generate_encoders_by_class_tuples( type_encoder_map: Dict[Any, Callable[[Any], Any]], ) -> Dict[Callable[[Any], Any], Tuple[Any, ...]]: encoders_by_class_tuples: Dict[Callable[[Any], Any], Tuple[Any, ...]] = defaultdict( tuple ) for type_, encoder in type_encoder_map.items(): encoders_by_class_tuples[encoder] += (type_,)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 10.8K bytes - Viewed (0) -
docs/en/docs/advanced/advanced-dependencies.md
But we want to be able to parameterize that fixed content. ## A "callable" instance In Python there's a way to make an instance of a class a "callable". Not the class itself (which is already a callable), but an instance of that class. To do that, we declare a method `__call__`: {* ../../docs_src/dependencies/tutorial011_an_py39.py hl[12] *}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 16:10:15 UTC 2024 - 2.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 16.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java
} } private static List<Callable<String>> createTasks(int n) { List<Callable<String>> callables = Lists.newArrayList(); for (int i = 0; i < n; i++) { callables.add(Callables.returning(RESULT_VALUE + i)); } return callables; } private static final class WrappedCallable<T> implements Callable<T> { private final Callable<T> delegate;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 9.9K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/FakeTimeLimiter.java
@Override @ParametricNullness public <T extends @Nullable Object> T callWithTimeout( Callable<T> callable, long timeoutDuration, TimeUnit timeoutUnit) throws ExecutionException { checkNotNull(callable); checkNotNull(timeoutUnit); try { return callable.call(); } catch (RuntimeException e) { throw new UncheckedExecutionException(e);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Dec 14 20:35:03 UTC 2023 - 3.5K bytes - Viewed (0) -
fastapi/background.py
from typing import Any, Callable from starlette.background import BackgroundTasks as StarletteBackgroundTasks from typing_extensions import Annotated, Doc, ParamSpec P = ParamSpec("P") class BackgroundTasks(StarletteBackgroundTasks): """ A collection of background tasks that will be called after a response has been sent to the client. Read more about it in the
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Apr 02 02:48:51 UTC 2024 - 1.7K bytes - Viewed (0)