iced_futures/backend/native/thread_pool.rs
1//! A `ThreadPool` backend.
2use futures::Future;
3
4/// A thread pool executor for futures.
5pub type Executor = futures::executor::ThreadPool;
6
7impl crate::Executor for Executor {
8 fn new() -> Result<Self, futures::io::Error> {
9 futures::executor::ThreadPool::new()
10 }
11
12 fn spawn(&self, future: impl Future<Output = ()> + Send + 'static) {
13 self.spawn_ok(future);
14 }
15}
16
17pub mod time {
18 //! Listen and react to time.
19}