Home
last modified time | relevance | path

Searched full:future (Results 1 – 25 of 5588) sorted by relevance

12345678910>>...224

/third_party/python/Doc/library/
Dasyncio-future.rst15 *Future* objects are used to bridge **low-level callback-based code**
19 Future Functions
26 * an instance of :class:`asyncio.Future`,
28 * a Future-like object with a ``_asyncio_future_blocking``
38 * *obj* argument as is, if *obj* is a :class:`Future`,
39 a :class:`Task`, or a Future-like object (:func:`isfuture`
64 Deprecation warning is emitted if *obj* is not a Future-like object
68 .. function:: wrap_future(future, *, loop=None)
70 Wrap a :class:`concurrent.futures.Future` object in a
71 :class:`asyncio.Future` object.
[all …]
/third_party/mindspore/mindspore-src/source/mindspore/core/mindrt/include/async/
Dfuture.h22 #include <future>
41 class Future : public FutureBase {
47 Future() : data(new (std::nothrow) Data()) { in Future() function
52 Future(const Future<T> &f) : FutureBase(f), data(f.data) {} in Future() function
54 Future(Future<T> &&f) : data(std::move(f.data)) {} in Future() function
56 explicit Future(const T &t) : data(new (std::nothrow) Data()) { in Future() function
62 explicit Future(const V &value) : data(new (std::nothrow) Data()) { in Future() function
67 explicit Future(const MindrtStatus &s) : data(new (std::nothrow) Data()) { in Future() function
72 explicit Future(const std::shared_ptr<Data> &t) : data(t) {} in Future() function
74 ~Future() override {} in ~Future()
[all …]
Dfuture_base.h20 #include <future>
31 class Future; variable
54 typedef std::function<void(const Future<T> &)> CompleteCallback;
55 typedef std::function<void(const Future<T> &)> AbandonedCallback;
63 future(promise.get_future()), in FutureData()
74 // status of future
85 std::future<T> future; member
102 typedef Future<T> type;
106 struct Wrap<Future<T>> {
107 typedef Future<T> type;
[all …]
Dcollect.h20 #include <future>
26 #include "async/future.h"
34 class Future; variable
45 …Collected(const std::list<Future<T>> &f, Promise<std::list<T>> *p) : futures(f), promise(p), ready… in Collected()
66 void Waited(const Future<T> &future) { in Waited() argument
67 if (future.IsError()) { in Waited()
68 promise->SetFailed(future.GetErrorCode()); in Waited()
69 } else if (future.IsOK()) { in Waited()
83 const std::list<Future<T>> futures;
89 inline Future<std::list<T>> Collect(const std::list<Future<T>> &futures) { in Collect()
[all …]
/third_party/python/Lib/asyncio/
Dfutures.py1 """A Future class similar to the one in PEP 3148."""
4 'Future', 'wrap_future', 'isfuture',
30 class Future: class
31 """This class is *almost* compatible with concurrent.futures.Future.
38 raise an exception when the future isn't done yet.
61 # the Future protocol (i.e. is intended to be duck-type compatible).
66 # `await Future()` or`yield from Future()` (correct) vs.
67 # `yield Future()` (incorrect).
73 """Initialize the future.
76 loop object used by the future. If it's not provided, the future uses
[all …]
Dbase_futures.py8 # States for Future.
15 """Check for a Future.
17 This returns True when obj is a Future instance or is advertising
19 See comment in Future for more details.
26 """helper function for Future.__repr__"""
45 def _future_repr_info(future): argument
46 # (Future) -> str
47 """helper function for Future.__repr__"""
48 info = [future._state.lower()]
49 if future._state == _FINISHED:
[all …]
/third_party/python/Lib/concurrent/futures/
D_base.py17 # Possible future states (for internal use by the futures package).
20 # The future was cancelled by the user...
46 """Base class for all future-related exceptions."""
50 """The Future was cancelled."""
65 def add_result(self, future): argument
66 self.finished_futures.append(future)
68 def add_exception(self, future): argument
69 self.finished_futures.append(future)
71 def add_cancelled(self, future): argument
72 self.finished_futures.append(future)
[all …]
/third_party/rust/rust/src/tools/clippy/tests/ui/
Dmanual_async_fn.rs5 use std::future::Future;
7 fn fut() -> impl Future<Output = i32> { in fut()
12 fn fut2() ->impl Future<Output = i32> { in fut2()
17 fn fut3()-> impl Future<Output = i32> { in fut3()
21 fn empty_fut() -> impl Future<Output = ()> { in empty_fut()
26 fn empty_fut2() ->impl Future<Output = ()> { in empty_fut2()
31 fn empty_fut3()-> impl Future<Output = ()> { in empty_fut3()
35 fn core_fut() -> impl core::future::Future<Output = i32> { in core_fut()
40 fn has_other_stmts() -> impl core::future::Future<Output = i32> { in has_other_stmts()
51 async fn already_async() -> impl Future<Output = i32> { in already_async()
[all …]
Dredundant_async_block.fixed6 use std::future::Future;
42 fn capture_local() -> impl Future<Output = i32> {
48 fn capture_local_closure(s: &str) -> impl Future<Output = &str> {
49 let f = move || std::future::ready(s);
55 fn capture_arg(s: &str) -> impl Future<Output = &str> {
61 fn capture_future_arg<T>(f: impl Future<Output = T>) -> impl Future<Output = T> {
66 fn capture_func_result<FN, F, T>(f: FN) -> impl Future<Output = T>
68 F: Future<Output = T>,
75 fn double_future(f: impl Future<Output = impl Future<Output = u32>>) -> impl Future<Output = u32> {
80 fn await_in_async<F, R>(f: F) -> impl Future<Output = u32>
[all …]
Dredundant_async_block.rs6 use std::future::Future;
42 fn capture_local() -> impl Future<Output = i32> { in capture_local()
48 fn capture_local_closure(s: &str) -> impl Future<Output = &str> { in capture_local_closure()
49 let f = move || std::future::ready(s); in capture_local_closure()
55 fn capture_arg(s: &str) -> impl Future<Output = &str> { in capture_arg()
61 fn capture_future_arg<T>(f: impl Future<Output = T>) -> impl Future<Output = T> { in capture_future_arg()
66 fn capture_func_result<FN, F, T>(f: FN) -> impl Future<Output = T> in capture_func_result()
68 F: Future<Output = T>, in capture_func_result()
75 fn double_future(f: impl Future<Output = impl Future<Output = u32>>) -> impl Future<Output = u32> { in double_future()
80 fn await_in_async<F, R>(f: F) -> impl Future<Output = u32> in await_in_async()
[all …]
Dmanual_async_fn.stderr4 LL | fn fut() -> impl Future<Output = i32> {
8 help: make the function `async` and return the output of the future directly
14 LL | fn fut() -> impl Future<Output = i32> { 42 }
20 LL | fn fut2() ->impl Future<Output = i32> {
23 help: make the function `async` and return the output of the future directly
29 LL | fn fut2() ->impl Future<Output = i32> { 42 }
35 LL | fn fut3()-> impl Future<Output = i32> {
38 help: make the function `async` and return the output of the future directly
44 LL | fn fut3()-> impl Future<Output = i32> { 42 }
50 LL | fn empty_fut() -> impl Future<Output = ()> {
[all …]
/third_party/rust/rust/tests/mir-opt/building/
Dasync_await.b-{closure#0}.generator_resume.0.mir5 ty: impl std::future::Future<Output = ()>,
13 ty: impl std::future::Future<Output = ()>,
38 let mut _4: impl std::future::Future<Output = ()>;
39 let mut _5: impl std::future::Future<Output = ()>;
40 let mut _6: impl std::future::Future<Output = ()>;
44 let mut _10: std::pin::Pin<&mut impl std::future::Future<Output = ()>>;
45 let mut _11: &mut impl std::future::Future<Output = ()>;
46 let mut _12: &mut impl std::future::Future<Output = ()>;
54 let mut _21: impl std::future::Future<Output = ()>;
55 let mut _22: impl std::future::Future<Output = ()>;
[all …]
/third_party/rust/rust/tests/ui/async-await/
Dgenerator-not-future.stderr1 error[E0277]: the trait bound `impl Future<Output = ()>: Generator<_>` is not satisfied
2 --> $DIR/generator-not-future.rs:31:21
5 …| --------------- ^^^^^^^^^^ the trait `Generator<_>` is not implemented for `impl Future<Outp…
10 --> $DIR/generator-not-future.rs:18:39
15 error[E0277]: the trait bound `impl Future<Output = ()>: Generator<_>` is not satisfied
16 --> $DIR/generator-not-future.rs:33:21
19 …-- ^^^^^^^^^^^^^^^^^^^^^ the trait `Generator<_>` is not implemented for `impl Future<Output = ()>`
24 --> $DIR/generator-not-future.rs:18:39
29 error[E0277]: the trait bound `[async block@$DIR/generator-not-future.rs:35:21: 35:29]: Generator<_…
30 --> $DIR/generator-not-future.rs:35:21
[all …]
Dsuggest-missing-await.stderr5 | -------- ^ expected `u32`, found future
9 note: calling an async function returns a future
19 help: consider `await`ing on the `Future`
28 | ^^^^^^^ expected `()`, found future
30 note: calling an async function returns a future
35 help: consider `await`ing on the `Future`
54 | | ^^^^^^^^^^^^^ expected future, found `()`
59 = note: expected opaque type `impl Future<Output = ()>`
61 help: consider `await`ing on the `Future`
72 | | ------- this is found to be of type `impl Future<Output = ()>`
[all …]
Dissue-61076.rs3 use core::future::Future;
19 impl Future for Struct {
24 impl Future for Tuple {
29 impl Future for T {
43 //~^ NOTE the `?` operator cannot be applied to type `impl Future<Output = Result<(), ()>>` in bar()
44 //~| HELP the trait `Try` is not implemented for `impl Future<Output = Result<(), ()>>` in bar()
45 //~| HELP consider `await`ing on the `Future` in bar()
65 //~| HELP consider `await`ing on the `Future` in baz()
72 //~^ HELP consider `await`ing on the `Future` in baz()
73 //~| NOTE field not available in `impl Future` in baz()
[all …]
Dissue-61076.stderr5 | ^^^^^^ the `?` operator cannot be applied to type `impl Future<Output = Result<(), ()>>`
7 = help: the trait `Try` is not implemented for `impl Future<Output = Result<(), ()>>`
8 help: consider `await`ing on the `Future`
20 help: consider `await`ing on the `Future`
25 error[E0609]: no field `0` on type `impl Future<Output = Tuple>`
29 …| ^ field not available in `impl Future`, but it is available in its `Out…
31 help: consider `await`ing on the `Future` and access the field of its `Output`
36 error[E0609]: no field `a` on type `impl Future<Output = Struct>`
40 …| ^ field not available in `impl Future`, but it is available in its `O…
42 help: consider `await`ing on the `Future` and access the field of its `Output`
[all …]
Dissue-98634.rs4 future::Future,
9 pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> {
13 impl<F> Future for StructAsync<F>
15 F: Fn() -> Pin<Box<dyn Future<Output = ()>>>,
34 pub fn block_on<F: Future>(&self, mut future: F) -> F::Output { in block_on()
37 Pin::new_unchecked(&mut future).poll(&mut Context::from_waker(waker())); in block_on()
46 …allback` to be a fn item that returns `Pin<Box<dyn Future<Output = ()>>>`, but it returns `impl Fu… in main()
47 …allback` to be a fn item that returns `Pin<Box<dyn Future<Output = ()>>>`, but it returns `impl Fu… in main()
48 …allback` to be a fn item that returns `Pin<Box<dyn Future<Output = ()>>>`, but it returns `impl Fu… in main()
/third_party/rust/rust/tests/ui/higher-ranked/trait-bounds/
Dissue-95034.rs5 future::Future,
16 type Future: Future<Output = Self>; typedef
17 fn create() -> Self::Future; in create()
22 type Future = Pin<Box<dyn Future<Output = Self>>>; typedef
23 fn create() -> Self::Future { in create()
30 type Future = CustomFut<'a, E, A>; typedef
31 fn create() -> Self::Future { in create()
37 ph: PhantomData<(A::Future,)>,
40 impl<'f, E, A: Object<'f, Error = E>> Future for CustomFut<'f, E, A> {
52 type Future: Future<Output = ()>; typedef
[all …]
/third_party/rust/rust/tests/ui/nll/
Dissue-61320-normalize.rs8 A: Future,
11 state: (A, B::Future, F),
18 impl<T, E> Future for FutureResult<T, E> {
29 impl<A, B, F> Future for AndThen<A, B, F>
31 A: Future,
43 pub trait Future { interface
61 /// The future that this type can be converted into.
62 type Future: Future<Item = Self::Item, Error = Self::Error>; typedef
64 /// The item that the future may resolve with.
66 /// The error that the future may resolve with.
[all …]
/third_party/rust/rust/library/core/src/future/
Dfuture.rs8 /// A future represents an asynchronous computation obtained by use of [`async`].
10 /// A future is a value that might not have finished computing yet. This kind of
16 /// The core method of future, `poll`, *attempts* to resolve the future into a
23 /// When using a future, you generally won't call `poll` directly, but instead
33 label = "`{Self}` is not a future",
34 message = "`{Self}` is not a future",
35 note = "{Self} must be a future or must implement `IntoFuture` to be awaited"
37 pub trait Future { interface
43 /// Attempt to resolve the future to a final value, registering
50 /// - [`Poll::Pending`] if the future is not ready yet
[all …]
/third_party/rust/rust/tests/ui/proc-macro/
Dpretty-print-hack-show.local.stderr7 … accepted by the compiler but is being phased out; it will become a hard error in a future release!
9 …= note: older versions of the `rental` crate will stop compiling in future versions of Rust; pleas…
18 … accepted by the compiler but is being phased out; it will become a hard error in a future release!
20 …= note: older versions of the `rental` crate will stop compiling in future versions of Rust; pleas…
28 … accepted by the compiler but is being phased out; it will become a hard error in a future release!
30 …= note: older versions of the `rental` crate will stop compiling in future versions of Rust; pleas…
38 … accepted by the compiler but is being phased out; it will become a hard error in a future release!
40 …= note: older versions of the `rental` crate will stop compiling in future versions of Rust; pleas…
48 … accepted by the compiler but is being phased out; it will become a hard error in a future release!
50 …= note: older versions of the `rental` crate will stop compiling in future versions of Rust; pleas…
[all …]
Dpretty-print-hack-show.remapped.stderr7 … accepted by the compiler but is being phased out; it will become a hard error in a future release!
9 …= note: older versions of the `rental` crate will stop compiling in future versions of Rust; pleas…
18 … accepted by the compiler but is being phased out; it will become a hard error in a future release!
20 …= note: older versions of the `rental` crate will stop compiling in future versions of Rust; pleas…
28 … accepted by the compiler but is being phased out; it will become a hard error in a future release!
30 …= note: older versions of the `rental` crate will stop compiling in future versions of Rust; pleas…
38 … accepted by the compiler but is being phased out; it will become a hard error in a future release!
40 …= note: older versions of the `rental` crate will stop compiling in future versions of Rust; pleas…
48 … accepted by the compiler but is being phased out; it will become a hard error in a future release!
50 …= note: older versions of the `rental` crate will stop compiling in future versions of Rust; pleas…
[all …]
/third_party/rust/rust/tests/ui/suggestions/
Dexpected-boxed-future-isnt-pinned.stderr2 --> $DIR/expected-boxed-future-isnt-pinned.rs:11:5
4 LL | fn foo<F: Future<Output=i32> + Send + 'static>(x: F) -> BoxFuture<'static, i32> {
5 … ----------------------- expected `Pin<Box<(dyn Future<Output = i32> + Se…
10 = note: expected struct `Pin<Box<(dyn Future<Output = i32> + Send + 'static)>>`
18 --> $DIR/expected-boxed-future-isnt-pinned.rs:15:5
20 LL | fn bar<F: Future<Output=i32> + Send + 'static>(x: F) -> BoxFuture<'static, i32> {
21 … ----------------------- expected `Pin<Box<(dyn Future<Output = i32> + Se…
25 = note: expected struct `Pin<Box<(dyn Future<Output = i32> + Send + 'static)>>`
30 --> $DIR/expected-boxed-future-isnt-pinned.rs:19:14
32 LL | fn baz<F: Future<Output=i32> + Send + 'static>(x: F) -> BoxFuture<'static, i32> {
[all …]
/third_party/skia/src/sfnt/
DSkIBMFamilyClass.h23 //6 reserved for future use
28 //11 reserved for future use
30 //13-15 reserved for future use
43 //9-14 reserved for future use
50 //3-14 reserved for future use
57 //3-14 reserved for future use
69 //8-14 reserved for future use
79 //6-14 reserved for future use
85 //2-14 reserved for future use
96 //7-8 reserved for future use
[all …]
/third_party/skia/m133/src/sfnt/
DSkIBMFamilyClass.h23 //6 reserved for future use
28 //11 reserved for future use
30 //13-15 reserved for future use
43 //9-14 reserved for future use
50 //3-14 reserved for future use
57 //3-14 reserved for future use
69 //8-14 reserved for future use
79 //6-14 reserved for future use
85 //2-14 reserved for future use
96 //7-8 reserved for future use
[all …]

12345678910>>...224