| 531 | /// with inferred types. If you encounter the following: |
| 532 | /// |
| 533 | /// ```compile_fail |
| 534 | /// # use forte::ThreadPool; |
| 535 | /// # use forte::Worker; |
| 536 | /// # static THREAD_POOL: ThreadPool = ThreadPool::new(); |
| 537 | /// THREAD_POOL.spawn(|_| { }); |
| 538 | /// // ^^^^^^^ ERROR: the trait `Spawn<'_, _>` is not implemented for closure ... |
| 539 | /// ``` |
| 540 | /// Try adding a type hint to the closure's parameters, like so: |
| 541 | /// ``` |
| 542 | /// # use forte::ThreadPool; |
| 543 | /// # use forte::Worker; |
| 544 | /// # static THREAD_POOL: ThreadPool = ThreadPool::new(); |
| 545 | /// THREAD_POOL.spawn(|_: &Worker| { }); |
| 546 | /// ``` |