Lines Matching +full:rust +full:- +full:executor
38 /// use futures::executor::ThreadPool;
41 /// let executor = ThreadPool::new().unwrap();
44 /// executor.spawn(future).unwrap();
46 …m_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/13…
49 fn spawn<Fut>(&self, future: Fut) -> Result<(), SpawnError> in spawn()
65 /// use futures::executor::{block_on, ThreadPool};
69 /// let executor = ThreadPool::new().unwrap();
72 /// let join_handle_fut = executor.spawn_with_handle(future).unwrap();
75 …m_millis(500)); // wait for background threads closed: https://github.com/rust-lang/miri/issues/13…
80 fn spawn_with_handle<Fut>(&self, future: Fut) -> Result<RemoteHandle<Fut::Output>, SpawnError> in spawn_with_handle()
90 /// Wraps a [`Spawn`] and makes it usable as a futures 0.1 `Executor`.
94 fn compat(self) -> Compat<Self> in compat()
120 /// use futures::executor::LocalPool;
123 /// let executor = LocalPool::new();
124 /// let spawner = executor.spawner();
130 fn spawn_local<Fut>(&self, future: Fut) -> Result<(), SpawnError> in spawn_local()
145 /// use futures::executor::LocalPool;
148 /// let mut executor = LocalPool::new();
149 /// let spawner = executor.spawner();
153 /// assert_eq!(executor.run_until(join_handle_fut), 1);
161 ) -> Result<RemoteHandle<Fut::Output>, SpawnError> in spawn_local_with_handle()