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