- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 177 for Callable (0.05 sec)
-
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-testlib/test/com/google/common/testing/FakeTickerTest.java
runConcurrentTest( numberOfThreads, new Callable<@Nullable Void>() { @Override public @Nullable Void call() throws Exception { long unused = ticker.read(); return null; } }); assertEquals(incrementByNanos * numberOfThreads, ticker.read()); } /** Runs {@code callable} concurrently {@code numberOfThreads} times. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 22 13:49:09 UTC 2024 - 6.5K bytes - Viewed (0) -
fastapi/param_functions.py
The parameter is available only for compatibility. """ ), ] = ..., *, default_factory: Annotated[ Union[Callable[[], Any], None], Doc( """ A callable to generate the default value. This doesn't affect `Path` parameters as the value is always required. The parameter is available only for compatibility.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 23 18:30:18 UTC 2024 - 62.5K bytes - Viewed (0) -
fastapi/dependencies/utils.py
assert callable( depends.dependency ), "A parameter-less dependency must have a callable dependency" return get_sub_dependant(depends=depends, dependency=depends.dependency, path=path) def get_sub_dependant( *, depends: params.Depends, dependency: Callable[..., Any], path: str, name: Optional[str] = None,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 21:46:26 UTC 2024 - 34.7K bytes - Viewed (0) -
compat/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/reflection/ClassMap.java
* and signature declared in a public superclass or implemented interface of this * method's declaring class. This counterpart method is publicly callable. * * @param method a method whose publicly callable counterpart is requested. * @return the publicly callable counterpart method. Note that if the parameter * method is itself declared by a public class, this method is an identity * function.
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 13.5K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Futures.java
* @throws RejectedExecutionException if the task cannot be scheduled for execution * @since 28.2 */ public static <O extends @Nullable Object> ListenableFuture<O> submit( Callable<O> callable, Executor executor) { TrustedListenableFutureTask<O> task = TrustedListenableFutureTask.create(callable); executor.execute(task); return task; } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 13:13:32 UTC 2024 - 64.7K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/Futures.java
* @throws RejectedExecutionException if the task cannot be scheduled for execution * @since 28.2 */ public static <O extends @Nullable Object> ListenableFuture<O> submit( Callable<O> callable, Executor executor) { TrustedListenableFutureTask<O> task = TrustedListenableFutureTask.create(callable); executor.execute(task); return task; } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 13:13:32 UTC 2024 - 64.4K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/AbstractScheduledService.java
public abstract static class CustomScheduler extends Scheduler { /** A callable class that can reschedule itself using a {@link CustomScheduler}. */ private final class ReschedulableCallable implements Callable<@Nullable Void> { /** The underlying task. */ private final Runnable wrappedRunnable; /** The executor on which this Callable will be scheduled. */ private final ScheduledExecutorService executor;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 16:22:21 UTC 2024 - 27.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ConcurrentHashMultisetBasherTest.java
import static java.lang.Math.min; import com.google.common.base.Function; import com.google.common.primitives.Ints; import java.util.List; import java.util.Random; import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentSkipListMap; import java.util.concurrent.ExecutionException;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 5.9K bytes - Viewed (0) -
compat/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
Callable<T> supplier) { Supplier<T> s = asSupplier(supplier); if (cache == null) { return s.get(); } else { return cache.computeIfAbsent(groupId, artifactId, version, tag.getName(), s); } } private static <T> T cache(ModelCache cache, Source source, ModelCacheTag<T> tag, Callable<T> supplier) {
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 83.6K bytes - Viewed (0)