| /external/rust/crates/grpcio-sys/grpc/src/core/lib/promise/ |
| D | arena_promise.h | 7 // http://www.apache.org/licenses/LICENSE-2.0 10 // distributed under the License is distributed on an "AS IS" BASIS, 49 // Destroy the underlying callable object if there is one. 51 // destructor, we expose this for when the ArenaPromise object is destroyed. 62 // Used when an empty ArenaPromise is created, or when the ArenaPromise is moved 64 // crash if it is. 80 // Implementation of ImplInterface for a callable object. 81 template <typename T, typename Callable> 86 return poll_cast<T>((*ArgAsPtr<Callable>(arg))()); in PollOnce() 89 static void Destroy(ArgType* arg) { Destruct(ArgAsPtr<Callable>(arg)); } in Destroy() [all …]
|
| /external/grpc-grpc/src/core/lib/promise/ |
| D | arena_promise.h | 7 // http://www.apache.org/licenses/LICENSE-2.0 10 // distributed under the License is distributed on an "AS IS" BASIS, 53 // Destroy the underlying callable object if there is one. 55 // destructor, we expose this for when the ArenaPromise object is destroyed. 66 // Used when an empty ArenaPromise is created, or when the ArenaPromise is moved 68 // crash if it is. 84 // Implementation of ImplInterface for a callable object. 85 template <typename T, typename Callable> 90 return poll_cast<T>((*ArgAsPtr<Callable>(arg))()); in PollOnce() 93 static void Destroy(ArgType* arg) { Destruct(ArgAsPtr<Callable>(arg)); } in Destroy() [all …]
|
| /external/python/cpython3/Objects/ |
| D | call.c | 33 _Py_CheckFunctionResult(PyThreadState *tstate, PyObject *callable, in _Py_CheckFunctionResult() argument 36 assert((callable != NULL) ^ (where != NULL)); in _Py_CheckFunctionResult() 40 if (callable) in _Py_CheckFunctionResult() 43 callable); in _Py_CheckFunctionResult() 49 /* Ensure that the bug is caught in debug mode. in _Py_CheckFunctionResult() 60 if (callable) { in _Py_CheckFunctionResult() 63 "%R returned a result with an exception set", callable); in _Py_CheckFunctionResult() 71 /* Ensure that the bug is caught in debug mode. in _Py_CheckFunctionResult() 91 slot_name, Py_TYPE(obj)->tp_name); in _Py_CheckSlotResult() 99 slot_name, Py_TYPE(obj)->tp_name); in _Py_CheckSlotResult() [all …]
|
| /external/guava/guava/src/com/google/common/util/concurrent/ |
| D | TimeLimiter.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 24 import java.util.concurrent.Callable; 45 * target} object, enforcing the specified time limit on each call. This time-limited delegation 46 * is also performed for calls to {@link Object#equals}, {@link Object#hashCode}, and {@link 49 * <p>If the target method call finishes before the limit is reached, the return value or 50 * exception is propagated to the caller exactly as-is. If, on the other hand, the time limit is 54 * <p>It is important to note that the primary purpose of the proxy object is to return control to 55 * the caller when the timeout elapses; aborting the target method call is of secondary concern. 56 * The particular nature and strength of the guarantees made by the proxy is [all …]
|
| D | Callables.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 23 import java.util.concurrent.Callable; 27 * Static utility methods pertaining to the {@link Callable} interface. 37 /** Creates a {@code Callable} which immediately returns a preset value each time it is called. */ 38 public static <T extends @Nullable Object> Callable<T> returning(@ParametricNullness T value) { in returning() 39 return () -> value; in returning() 43 * Creates an {@link AsyncCallable} from a {@link Callable}. 46 * ListeningExecutorService#submit(Callable)}. 53 Callable<T> callable, ListeningExecutorService listeningExecutorService) { in asAsyncCallable() argument [all …]
|
| D | TrustedListenableFutureTask.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 21 import java.util.concurrent.Callable; 39 AsyncCallable<V> callable) { in create() argument 40 return new TrustedListenableFutureTask<>(callable); in create() 43 static <V extends @Nullable Object> TrustedListenableFutureTask<V> create(Callable<V> callable) { in create() argument 44 return new TrustedListenableFutureTask<>(callable); in create() 58 return new TrustedListenableFutureTask<>(Executors.callable(runnable, result)); in create() 65 * <p>{@code volatile} is required for j2objc transpiling: 66 * https://developers.google.com/j2objc/guides/j2objc-memory-model#atomicity [all …]
|
| D | CombinedFuture.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 23 import java.util.concurrent.Callable; 31 /** Aggregate future that computes its value by calling a callable. */ 42 AsyncCallable<V> callable) { in CombinedFuture() argument 44 this.task = new AsyncCallableInterruptibleTask(callable, listenerExecutor); in CombinedFuture() 52 Callable<V> callable) { in CombinedFuture() argument 54 this.task = new CallableInterruptibleTask(callable, listenerExecutor); in CombinedFuture() 73 * If the output future is done, then it won't need to interrupt the task later, so it can clear in releaseResources() 76 * If the output future is *not* done, then the task field will be cleared after the task runs in releaseResources() [all …]
|
| D | WrappingExecutorService.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 27 import java.util.concurrent.Callable; 37 * An abstract {@code ExecutorService} that allows subclasses to {@linkplain #wrapTask(Callable) 40 * <p>Note that task wrapping may occur even if the task is never executed. 42 * <p>For delegation without task-wrapping, see {@link ForwardingExecutorService}. 57 * Wraps a {@code Callable} for submission to the underlying executor. This method is also applied 60 protected abstract <T extends @Nullable Object> Callable<T> wrapTask(Callable<T> callable); in wrapTask() argument 64 * delegates to {@link #wrapTask(Callable)}. 67 Callable<Object> wrapped = wrapTask(Executors.callable(command, null)); in wrapTask() [all …]
|
| /external/apache-commons-lang/src/main/java/org/apache/commons/lang3/concurrent/ |
| D | CallableBackgroundInitializer.java | 9 * http://www.apache.org/licenses/LICENSE-2.0 12 * distributed under the License is distributed on an "AS IS" BASIS, 20 import java.util.concurrent.Callable; 25 * {@link Callable} object. 28 * An instance of this class is initialized with a {@link Callable} object when 29 * it is constructed. The implementation of the {@link #initialize()} method 30 * defined in the super class delegates to this {@link Callable} so that the 31 * {@link Callable} is executed in the background thread. 34 * The {@code java.util.concurrent.Callable} interface is a standard mechanism 40 * Usage of this class is very similar to the default usage pattern of the [all …]
|
| /external/mesa3d/src/gfxstream/guest/android-emu/aemu/base/fit/ |
| D | FunctionInternal.h | 7 // http://www.apache.org/licenses/LICENSE-2.0 10 // distributed under the License is distributed on an "AS IS" BASIS, 16 // Use of this source code is governed by a BSD-style license that can be 45 template <typename Callable, bool is_inline, bool is_shared, typename Result, typename... Args> 83 template <typename Callable, typename Result, typename... Args> 84 struct target<Callable, 92 new (bits) Callable(std::forward<Callable_>(target)); 95 auto& target = *static_cast<Callable*>(bits); 99 auto& from_target = *static_cast<Callable*>(from_bits); 100 new (to_bits) Callable(std::move(from_target)); [all …]
|
| /external/cronet/base/test/android/javatests/src/org/chromium/base/test/util/ |
| D | CriteriaHelper.java | 2 // Use of this source code is governed by a BSD-style license that can be 15 import java.util.concurrent.Callable; 35 * CriteriaHelper.pollUiThread(() -> { 39 * getActivity().getAppMenuHandler().isAppMenuShowing(), Matchers.is(true)); 52 * CriteriaHelper.pollUiThread(() -> getActivity().getAppMenuHandler().isAppMenuShowing(), 73 * This evaluates the Criteria on the Instrumentation thread, which more often than not is not 95 // Espresso catches, wraps, and re-throws the exception we want the CriteriaHelper in pollThreadInternal() 131 // and the criteria is not satisfied, the while loop will run again. in sleepThread() 141 () -> { in nestThread() 165 * This evaluates the Runnable on the test thread, which more often than not is not correct [all …]
|
| /external/guava/android/guava/src/com/google/common/util/concurrent/ |
| D | Callables.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 23 import java.util.concurrent.Callable; 27 * Static utility methods pertaining to the {@link Callable} interface. 37 /** Creates a {@code Callable} which immediately returns a preset value each time it is called. */ 38 public static <T extends @Nullable Object> Callable<T> returning(@ParametricNullness T value) { in returning() 39 return () -> value; in returning() 43 * Creates an {@link AsyncCallable} from a {@link Callable}. 46 * ListeningExecutorService#submit(Callable)}. 53 Callable<T> callable, ListeningExecutorService listeningExecutorService) { in asAsyncCallable() argument [all …]
|
| D | TrustedListenableFutureTask.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 21 import java.util.concurrent.Callable; 39 AsyncCallable<V> callable) { in create() argument 40 return new TrustedListenableFutureTask<>(callable); in create() 43 static <V extends @Nullable Object> TrustedListenableFutureTask<V> create(Callable<V> callable) { in create() argument 44 return new TrustedListenableFutureTask<>(callable); in create() 58 return new TrustedListenableFutureTask<>(Executors.callable(runnable, result)); in create() 65 * <p>{@code volatile} is required for j2objc transpiling: 66 * https://developers.google.com/j2objc/guides/j2objc-memory-model#atomicity [all …]
|
| D | CombinedFuture.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 23 import java.util.concurrent.Callable; 31 /** Aggregate future that computes its value by calling a callable. */ 42 AsyncCallable<V> callable) { in CombinedFuture() argument 44 this.task = new AsyncCallableInterruptibleTask(callable, listenerExecutor); in CombinedFuture() 52 Callable<V> callable) { in CombinedFuture() argument 54 this.task = new CallableInterruptibleTask(callable, listenerExecutor); in CombinedFuture() 73 * If the output future is done, then it won't need to interrupt the task later, so it can clear in releaseResources() 76 * If the output future is *not* done, then the task field will be cleared after the task runs in releaseResources() [all …]
|
| D | TimeLimiter.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 22 import java.util.concurrent.Callable; 44 * target} object, enforcing the specified time limit on each call. This time-limited delegation 45 * is also performed for calls to {@link Object#equals}, {@link Object#hashCode}, and {@link 48 * <p>If the target method call finishes before the limit is reached, the return value or 49 * exception is propagated to the caller exactly as-is. If, on the other hand, the time limit is 53 * <p>It is important to note that the primary purpose of the proxy object is to return control to 54 * the caller when the timeout elapses; aborting the target method call is of secondary concern. 55 * The particular nature and strength of the guarantees made by the proxy is [all …]
|
| D | WrappingExecutorService.java | 7 * http://www.apache.org/licenses/LICENSE-2.0 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 27 import java.util.concurrent.Callable; 37 * An abstract {@code ExecutorService} that allows subclasses to {@linkplain #wrapTask(Callable) 40 * <p>Note that task wrapping may occur even if the task is never executed. 42 * <p>For delegation without task-wrapping, see {@link ForwardingExecutorService}. 57 * Wraps a {@code Callable} for submission to the underlying executor. This method is also applied 60 protected abstract <T extends @Nullable Object> Callable<T> wrapTask(Callable<T> callable); in wrapTask() argument 64 * delegates to {@link #wrapTask(Callable)}. 67 Callable<Object> wrapped = wrapTask(Executors.callable(command, null)); in wrapTask() [all …]
|
| /external/pigweed/third_party/fuchsia/repo/sdk/lib/fit/include/lib/fit/internal/ |
| D | function.h | 2 // Use of this source code is governed by a BSD-style license that can be 27 // Rounds the first argument up to a non-zero multiple of the second argument. 29 return value == 0 ? multiple : (value + multiple - 1) / multiple * multiple; in RoundUpToMultiple() 33 // instantiated with an inline size that is a non-zero multiple of the word size. 36 // target_ops is the vtable for the function_base class. The base_target_ops struct holds functions 38 // The derived target_ops template that adds the signature-specific invoke method. 71 template <typename Callable, bool is_inline, bool is_shared, typename Allocator, typename Result, 83 // All function_base instantiations, regardless of callable type, use the same 116 // for all callable types of a particular size to reduce code size. 122 template <typename Callable, typename Allocator, typename Result, typename... Args> [all …]
|
| /external/swiftshader/third_party/llvm-16.0/llvm/include/llvm/ADT/ |
| D | STLFunctionalExtras.h | 1 //===- llvm/ADT/STLFunctionalExtras.h - Extras for <functional> -*- C++ -*-===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 11 // No library is required when using these functions. 13 //===----------------------------------------------------------------------===// 26 //===----------------------------------------------------------------------===// 28 //===----------------------------------------------------------------------===// 30 /// An efficient, type-erasing, non-owning reference to a callable. This is 31 /// intended for use as the type of a function parameter that is not used 34 /// This class does not own the callable, so it is not in general safe to store [all …]
|
| /external/python/cpython3/Doc/c-api/ |
| D | call.rst | 12 ---------------------- 14 Instances of classes that set :c:member:`~PyTypeObject.tp_call` are callable. 15 The signature of the slot is:: 17 PyObject *tp_call(PyObject *callable, PyObject *args, PyObject *kwargs); 19 A call is made using a tuple for the positional arguments 21 ``callable(*args, **kwargs)`` in Python code. 22 *args* must be non-NULL (use an empty tuple if there are no arguments) 25 This convention is not only used by *tp_call*: 30 :ref:`call API <capi-call>`. 36 ----------------------- [all …]
|
| /external/javaparser/javaparser-core-generators/src/main/java/com/github/javaparser/generator/ |
| D | Generator.java | 45 .filter(a -> !a.getNameAsString().equals(annotation.getSimpleName())) in annotate() 57 …od that looks for a method or constructor with an identical signature as "callable" and replaces it 58 …* with callable. If not found, adds callable. When the new callable has no javadoc, any old javado… 60 …ignature(ClassOrInterfaceDeclaration containingClassOrInterface, CallableDeclaration<?> callable) { in addOrReplaceWhenSameSignature() argument 61 …addMethod(containingClassOrInterface, callable, () -> containingClassOrInterface.addMember(callabl… in addOrReplaceWhenSameSignature() 65 …od that looks for a method or constructor with an identical signature as "callable" and replaces it 66 …* with callable. If not found, fails. When the new callable has no javadoc, any old javadoc will b… 67 * method or constructor is annotated with the generator class. 69 …ignature(ClassOrInterfaceDeclaration containingClassOrInterface, CallableDeclaration<?> callable) { in replaceWhenSameSignature() argument 70 addMethod(containingClassOrInterface, callable, in replaceWhenSameSignature() [all …]
|
| /external/guice/extensions/servlet/src/com/google/inject/servlet/ |
| D | ServletScopes.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 11 * distributed under the License is distributed on an "AS IS" BASIS, 31 import java.util.concurrent.Callable; 48 * A threadlocal scope map for non-http request scopes. The {@link #REQUEST} scope falls back to 49 * this scope map if no http request is available, and requires {@link #scopeRequest} to be called 67 /** Keys bound in request-scope which are handled directly by GuiceFilter. */ in scope() 77 // request is in progress. in scope() 82 // a reference to it, and it is only available via a threadlocal. in scope() 96 // Store a sentinel for provider-given null values. in scope() 103 // exception is thrown. in scope() [all …]
|
| /external/python/cpython3/Include/internal/ |
| D | pycore_call.h | 15 PyObject *callable, 22 PyObject *callable, 29 PyObject *callable, 34 PyThreadState *tstate, PyObject *callable, const char *format, ...); 39 _PyVectorcall_FunctionInline(PyObject *callable) in _PyVectorcall_FunctionInline() argument 41 assert(callable != NULL); in _PyVectorcall_FunctionInline() 43 PyTypeObject *tp = Py_TYPE(callable); in _PyVectorcall_FunctionInline() 47 assert(PyCallable_Check(callable)); in _PyVectorcall_FunctionInline() 49 Py_ssize_t offset = tp->tp_vectorcall_offset; in _PyVectorcall_FunctionInline() 53 memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); in _PyVectorcall_FunctionInline() [all …]
|
| /external/llvm-libc/src/__support/CPP/ |
| D | functional.h | 1 //===-- Self contained functional header ------------------------*- C++ -*-===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 27 /// This class does not own the callable, so it is not in general safe to 32 Ret (*callback)(intptr_t callable, Params... params) = nullptr; 33 intptr_t callable; variable 35 template <typename Callable> 36 LIBC_INLINE static Ret callback_fn(intptr_t callable, Params... params) { in callback_fn() argument 37 return (*reinterpret_cast<Callable *>(callable))( in callback_fn() 46 template <typename Callable> [all …]
|
| /external/grpc-grpc/src/python/grpcio/grpc/ |
| D | _typing.py | 7 # http://www.apache.org/licenses/LICENSE-2.0 10 # distributed under the License is distributed on an "AS IS" BASIS, 19 Callable, 37 SerializingFunction = Callable[[Any], bytes] 38 DeserializingFunction = Callable[[bytes], Any] 41 DoneCallbackType = Callable[[Any], None] 42 NullaryCallbackType = Callable[[], None] 45 UserTag = Callable[[cygrpc.BaseEvent], bool] 46 IntegratedCallFactory = Callable[ 63 ServerCallbackTag = Callable[[cygrpc.BaseEvent], ServerTagCallbackType] [all …]
|
| /external/opencensus-java/api/src/main/java/io/opencensus/trace/ |
| D | CurrentSpanUtils.java | 8 * http://www.apache.org/licenses/LICENSE-2.0 11 * distributed under the License is distributed on an "AS IS" BASIS, 21 import java.util.concurrent.Callable; 41 * Enters the scope of code where the given {@link Span} is in the current context, and returns an 42 * object that represents that scope. The scope is exited when the returned object is closed. 44 * <p>Supports try-with-resource idiom. 48 * @return An object that defines a scope where the given {@code Span} is set to the current 68 * Wraps a {@link Callable} so that it executes with the {@code span} as the current {@code Span}. 72 * @param callable the {@code Callable} to run in the {@code Span}. 73 * @return the wrapped {@code Callable}. [all …]
|