Home
last modified time | relevance | path

Searched refs:promise (Results 1 – 25 of 211) sorted by relevance

123456789

/external/grpc-grpc-java/netty/src/main/java/io/grpc/netty/
DWriteQueue.java79 Preconditions.checkArgument(command.promise() == null, "promise must not be set on command"); in enqueue()
81 ChannelPromise promise = channel.newPromise(); in enqueue() local
82 command.promise(promise); in enqueue()
87 return promise; in enqueue()
143 public final void promise(ChannelPromise promise) { in promise() method in WriteQueue.RunnableCommand
148 public final ChannelPromise promise() { in promise() method in WriteQueue.RunnableCommand
160 private ChannelPromise promise; field in WriteQueue.AbstractQueuedCommand
163 public final void promise(ChannelPromise promise) { in promise() argument
164 this.promise = promise; in promise()
168 public final ChannelPromise promise() { in promise() method in WriteQueue.AbstractQueuedCommand
[all …]
DSendGrpcFrameCommand.java32 private ChannelPromise promise; field in SendGrpcFrameCommand
110 public ChannelPromise promise() { in promise() method in SendGrpcFrameCommand
111 return promise; in promise()
115 public void promise(ChannelPromise promise) { in promise() method in SendGrpcFrameCommand
116 this.promise = promise; in promise()
121 channel.write(this, promise); in run()
DNettyClientHandler.java297 public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) in write() argument
300 createStream((CreateStreamCommand) msg, promise); in write() local
302 sendGrpcFrame(ctx, (SendGrpcFrameCommand) msg, promise); in write()
304 cancelStream(ctx, (CancelClientStreamCommand) msg, promise); in write()
306 sendPingFrame(ctx, (SendPingCommand) msg, promise); in write()
308 gracefulClose(ctx, (GracefulCloseCommand) msg, promise); in write()
310 forcefulClose(ctx, (ForcefulCloseCommand) msg, promise); in write()
312 ctx.write(Unpooled.EMPTY_BUFFER, promise); in write()
383 public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { in close() argument
389 super.close(ctx, promise); in close()
[all …]
/external/kotlinx.coroutines/kotlinx-coroutines-core/js/test/
DPromiseTest.kt12 fun testPromiseResolvedAsDeferred() = GlobalScope.promise { in <lambda>()
13 val promise = Promise<String> { resolve, _ -> in <lambda>() constant
16 val deferred = promise.asDeferred() in <lambda>()
21 fun testPromiseRejectedAsDeferred() = GlobalScope.promise { in <lambda>()
23 val promise = Promise<String> { _, reject -> in <lambda>() constant
26 val deferred = promise.asDeferred() in <lambda>()
39 fun testCompletedDeferredAsPromise() = GlobalScope.promise { in <lambda>()
44 val promise = deferred.asPromise() in <lambda>() constant
45 assertEquals("OK", promise.await()) in <lambda>()
49 fun testWaitForDeferredAsPromise() = GlobalScope.promise { in <lambda>()
[all …]
/external/libcxx/test/std/thread/futures/futures.promise/
Dcopy_ctor.fail.cpp26 std::promise<int> p0; in main()
27 … std::promise<int> p(p0); // expected-error {{call to deleted constructor of 'std::promise<int>'}} in main()
30 std::promise<int &> p0; in main()
31 …std::promise<int &> p(p0); // expected-error {{call to deleted constructor of 'std::promise<int &>… in main()
34 std::promise<void> p0; in main()
35 …std::promise<void> p(p0); // expected-error {{call to deleted constructor of 'std::promise<void>'}} in main()
39 std::promise<int> p0; in main()
40 …std::promise<int> p(p0); // expected-error {{calling a private constructor of class 'std::__1::pro… in main()
43 std::promise<int &> p0; in main()
44 …std::promise<int &> p(p0); // expected-error {{calling a private constructor of class 'std::__1::p… in main()
[all …]
Dalloc_ctor.pass.cpp30 std::promise<int> p(std::allocator_arg, test_allocator<int>(42)); in main()
38 std::promise<int&> p(std::allocator_arg, test_allocator<int>(42)); in main()
46 std::promise<void> p(std::allocator_arg, test_allocator<void>(42)); in main()
55 std::promise<int> p(std::allocator_arg, bare_allocator<void>()); in main()
60 std::promise<int&> p(std::allocator_arg, bare_allocator<void>()); in main()
65 std::promise<void> p(std::allocator_arg, bare_allocator<void>()); in main()
71 std::promise<int> p(std::allocator_arg, min_allocator<void>()); in main()
76 std::promise<int&> p(std::allocator_arg, min_allocator<void>()); in main()
81 std::promise<void> p(std::allocator_arg, min_allocator<void>()); in main()
Dcopy_assign.fail.cpp26 std::promise<int> p0, p; in main()
30 std::promise<int&> p0, p; in main()
34 std::promise<void> p0, p; in main()
39 std::promise<int> p0, p; in main()
43 std::promise<int&> p0, p; in main()
47 std::promise<void> p0, p; in main()
Dswap.pass.cpp30 std::promise<int> p0(std::allocator_arg, test_allocator<int>()); in main()
31 std::promise<int> p(std::allocator_arg, test_allocator<int>()); in main()
44 std::promise<int> p0(std::allocator_arg, test_allocator<int>()); in main()
45 std::promise<int> p(std::allocator_arg, test_allocator<int>()); in main()
58 std::promise<int> p0(std::allocator_arg, test_allocator<int>()); in main()
59 std::promise<int> p; in main()
72 std::promise<int> p0(std::allocator_arg, test_allocator<int>()); in main()
73 std::promise<int> p; in main()
Dmove_ctor.pass.cpp29 std::promise<int> p0(std::allocator_arg, test_allocator<int>()); in main()
30 std::promise<int> p(std::move(p0)); in main()
50 std::promise<int&> p0(std::allocator_arg, test_allocator<int>()); in main()
51 std::promise<int&> p(std::move(p0)); in main()
71 std::promise<void> p0(std::allocator_arg, test_allocator<void>()); in main()
72 std::promise<void> p(std::move(p0)); in main()
Ddtor.pass.cpp30 std::promise<T> p; in main()
41 std::promise<T> p; in main()
62 std::promise<T> p; in main()
73 std::promise<T> p; in main()
93 std::promise<T> p; in main()
105 std::promise<T> p; in main()
/external/v8/src/runtime/
Druntime-promise.cc23 CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0); in RUNTIME_FUNCTION()
26 Handle<Object> rejected_promise = promise; in RUNTIME_FUNCTION()
32 isolate->RunPromiseHook(PromiseHookType::kResolve, promise, in RUNTIME_FUNCTION()
37 if (!promise->has_handler()) { in RUNTIME_FUNCTION()
38 isolate->ReportPromiseReject(promise, value, in RUNTIME_FUNCTION()
47 CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0); in RUNTIME_FUNCTION()
49 isolate->ReportPromiseReject(promise, reason, in RUNTIME_FUNCTION()
57 CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0); in RUNTIME_FUNCTION()
59 isolate->ReportPromiseReject(promise, resolution, in RUNTIME_FUNCTION()
67 CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0); in RUNTIME_FUNCTION()
[all …]
/external/v8/src/builtins/
Dpromise-abstract-operations.tq5 #include 'src/builtins/builtins-promise.h'
6 #include 'src/builtins/builtins-promise-gen.h'
25 // https://tc39.es/ecma262/#sec-promise-abstract-operations
26 namespace promise {
163 // promise), see https://crbug.com/931640 for details on this.
195 promise: JSPromise, value: JSAny): Undefined {
196 // Assert: The value of promise.[[PromiseState]] is "pending".
197 assert(promise.Status() == PromiseState::kPending);
199 // 2. Let reactions be promise.[[PromiseFulfillReactions]].
201 UnsafeCast<(Zero | PromiseReaction)>(promise.reactions_or_result);
[all …]
Dpromise-then.tq5 #include 'src/builtins/builtins-promise-gen.h'
7 namespace promise {
19 // https://tc39.es/ecma262/#sec-promise.prototype.then
23 // 1. Let promise be the this value.
24 // 2. If IsPromise(promise) is false, throw a TypeError exception.
25 const promise = Cast<JSPromise>(receiver) otherwise ThrowTypeError(
29 // 3. Let C be ? SpeciesConstructor(promise, %Promise%).
36 if (IsPromiseSpeciesLookupChainIntact(context, promise.map)) {
40 const constructor = SpeciesConstructor(promise, promiseFun);
46 resultPromise = promiseCapability.promise;
[all …]
Dbuiltins-async-function-gen.cc47 TNode<JSPromise> promise = LoadObjectField<JSPromise>( in AsyncFunctionAwaitResumeClosure() local
49 CallRuntime(Runtime::kDebugAsyncFunctionResumed, context, promise); in AsyncFunctionAwaitResumeClosure()
117 TNode<JSPromise> promise = UncheckedCast<JSPromise>( in TF_BUILTIN() local
119 StoreMapNoWriteBarrier(promise, promise_map); in TF_BUILTIN()
120 StoreObjectFieldRoot(promise, JSPromise::kPropertiesOrHashOffset, in TF_BUILTIN()
122 StoreObjectFieldRoot(promise, JSPromise::kElementsOffset, in TF_BUILTIN()
124 PromiseInit(promise); in TF_BUILTIN()
158 async_function_object, JSAsyncFunctionObject::kPromiseOffset, promise); in TF_BUILTIN()
169 CallRuntime(Runtime::kDebugAsyncFunctionEntered, context, promise); in TF_BUILTIN()
183 TNode<JSPromise> promise = LoadObjectField<JSPromise>( in TF_BUILTIN() local
[all …]
Dpromise-resolve.tq5 #include 'src/builtins/builtins-promise-gen.h'
12 namespace promise {
16 // https://tc39.es/ecma262/#sec-promise.resolve
75 return capability.promise;
88 // https://tc39.es/ecma262/#sec-promise-resolve-functions
91 promise: JSPromise, resolution: JSAny): JSAny {
92 // 7. If SameValue(resolution, promise) is true, then
93 // If promise hook is enabled or the debugger is active, let
97 // We also let the runtime handle it if promise == resolution.
98 // We can use pointer comparison here, since the {promise} is guaranteed
[all …]
Dpromise-misc.tq5 #include 'src/builtins/builtins-promise.h'
6 #include 'src/builtins/builtins-promise-gen.h'
20 namespace promise {
24 macro PromiseHasHandler(promise: JSPromise): bool {
25 return promise.HasHandler();
29 macro PromiseInit(promise: JSPromise): void {
30 promise.reactions_or_result = kZero;
31 promise.flags = SmiTag(JSPromiseFlags{
37 promise_internal::ZeroOutEmbedderOffsets(promise);
46 const promise = UnsafeCast<JSPromise>(promiseHeapObject);
[all …]
Dpromise-finally.tq5 #include 'src/builtins/builtins-promise.h'
6 #include 'src/builtins/builtins-promise-gen.h'
8 namespace promise {
75 // 6. Let promise be ? PromiseResolve(C, result).
76 const promise = PromiseResolve(constructor, result);
82 // 8. Return ? Invoke(promise, "then", « thrower »).
83 return UnsafeCast<JSAny>(InvokeThen(nativeContext, promise, thrower));
122 // 6. Let promise be ? PromiseResolve(C, result).
123 const promise = PromiseResolve(constructor, result);
129 // 8. Return ? Invoke(promise, "then", « valueThunk »).
[all …]
/external/libcxx/test/std/thread/futures/futures.shared_future/
Dget.pass.cpp26 void func1(std::promise<int> p) in func1()
32 void func2(std::promise<int> p) in func2()
40 void func3(std::promise<int&> p) in func3()
47 void func4(std::promise<int&> p) in func4()
53 void func5(std::promise<void> p) in func5()
59 void func6(std::promise<void> p) in func6()
70 std::promise<T> p; in main()
79 std::promise<T> p; in main()
99 std::promise<T> p; in main()
108 std::promise<T> p; in main()
[all …]
/external/libcxx/test/std/thread/futures/futures.unique_future/
Dget.pass.cpp26 void func1(std::promise<int> p) in func1()
32 void func2(std::promise<int> p) in func2()
40 void func3(std::promise<int&> p) in func3()
47 void func4(std::promise<int&> p) in func4()
53 void func5(std::promise<void> p) in func5()
59 void func6(std::promise<void> p) in func6()
70 std::promise<T> p; in main()
79 std::promise<T> p; in main()
99 std::promise<T> p; in main()
108 std::promise<T> p; in main()
[all …]
/external/grpc-grpc-java/alts/src/main/java/io/grpc/alts/internal/
DTsiFrameHandler.java82 public void write(ChannelHandlerContext ctx, Object message, ChannelPromise promise) in write() argument
89 Future<?> possiblyIgnoredError = promise.setSuccess(); in write()
94 pendingUnprotectedWrites.add(msg, promise); in write()
112 public void bind(ChannelHandlerContext ctx, SocketAddress localAddress, ChannelPromise promise) { in bind() argument
113 ctx.bind(localAddress, promise); in bind()
121 ChannelPromise promise) { in connect() argument
122 ctx.connect(remoteAddress, localAddress, promise); in connect()
126 public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) { in disconnect() argument
127 ctx.disconnect(promise); in disconnect()
131 public void close(ChannelHandlerContext ctx, ChannelPromise promise) { in close() argument
[all …]
/external/libcxx/include/
Dfuture59 class promise
62 promise();
64 promise(allocator_arg_t, const Allocator& a);
65 promise(promise&& rhs) noexcept;
66 promise(const promise& rhs) = delete;
67 ~promise();
70 promise& operator=(promise&& rhs) noexcept;
71 promise& operator=(const promise& rhs) = delete;
72 void swap(promise& other) noexcept;
89 class promise<R&>
[all …]
/external/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/
Dpromise.pass.cpp51 assert(&h.promise() == this); in do_runtime_test()
52 assert(&h2.promise() == this); in do_runtime_test()
53 assert(&h3.promise() == this); in do_runtime_test()
69 ASSERT_SAME_TYPE(decltype(H.promise()), Promise&); in do_test()
70 LIBCPP_ASSERT_NOT_NOEXCEPT(H.promise()); in do_test()
74 ASSERT_SAME_TYPE(decltype(CH.promise()), Promise&); in do_test()
75 LIBCPP_ASSERT_NOT_NOEXCEPT(CH.promise()); in do_test()
/external/swiftshader/third_party/llvm-7.0/llvm/test/Transforms/Coroutines/
Dex4.ll1 ; Fourth example from Doc/Coroutines.rst (coroutine promise)
6 %promise = alloca i32
7 %pv = bitcast i32* %promise to i8*
22 store i32 %n.val, i32* %promise
39 %promise.addr.raw = call i8* @llvm.coro.promise(i8* %hdl, i32 4, i1 false)
40 %promise.addr = bitcast i8* %promise.addr.raw to i32*
41 %val0 = load i32, i32* %promise.addr
44 %val1 = load i32, i32* %promise.addr
47 %val2 = load i32, i32* %promise.addr
57 declare i8* @llvm.coro.promise(i8*, i32, i1)
/external/libcxx/src/
Dfuture.cpp200 promise<void>::promise() in promise() function in promise
205 promise<void>::~promise() in ~promise()
220 promise<void>::get_future() in get_future()
228 promise<void>::set_value() in set_value()
236 promise<void>::set_exception(exception_ptr __p) in set_exception()
244 promise<void>::set_value_at_thread_exit() in set_value_at_thread_exit()
252 promise<void>::set_exception_at_thread_exit(exception_ptr __p) in set_exception_at_thread_exit()
/external/v8/src/d8/
Dasync-hooks-wrapper.cc123 void AsyncHooks::ShellPromiseHook(PromiseHookType type, Local<Promise> promise, in ShellPromiseHook() argument
126 PerIsolateData::Get(promise->GetIsolate())->GetAsyncHooks(); in ShellPromiseHook()
138 CHECK(!promise in ShellPromiseHook()
142 promise->SetPrivate(currentContext, in ShellPromiseHook()
152 promise->SetPrivate(currentContext, in ShellPromiseHook()
158 promise->SetPrivate(currentContext, in ShellPromiseHook()
165 promise in ShellPromiseHook()
172 promise in ShellPromiseHook()
184 PromiseHookDispatch(type, promise, parent, wrap, hooks); in ShellPromiseHook()
217 Local<Promise> promise, in PromiseHookDispatch() argument
[all …]

123456789