mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-02-25 05:42:18 +08:00
19 lines
305 B
Rust
Executable File
19 lines
305 B
Rust
Executable File
pub struct ThreadPool;
|
|
|
|
// ANCHOR: here
|
|
impl ThreadPool {
|
|
// --snip--
|
|
// ANCHOR_END: here
|
|
pub fn new(size: usize) -> ThreadPool {
|
|
ThreadPool
|
|
}
|
|
|
|
// ANCHOR: here
|
|
pub fn execute<F>(&self, f: F)
|
|
where
|
|
F: FnOnce() + Send + 'static,
|
|
{
|
|
}
|
|
}
|
|
// ANCHOR_END: here
|