| 531 | // Spawn Trait |
| 532 | |
| 533 | pub use async_task::Task; |
| 534 | |
| 535 | /// A trait for types that can be spawned onto a [`ThreadPool`]. |
| 536 | /// |
| 537 | /// This trait is sealed and cannot be implemented outside of forte. |
| 538 | /// |
| 539 | /// It is implemented for: |
| 540 | /// |
| 541 | /// * Closures that satisfy `for<'worker> FnOnce(&'worker Worker) + Send + 'static`. |
| 542 | /// |
| 543 | /// * Futures that satisfy `Future<Output = T> + Send + 'static` where `T: Send + 'static`. |
| 544 | /// |
| 545 | /// * References to `'static` [`JobStorage`], which run the stored [`Job`] |
| 546 | /// without allocating. |