parent
24d3ee6a97
commit
8d101ee6e9
1 changed files with 7 additions and 0 deletions
|
|
@ -10,9 +10,16 @@ pub struct ThreadPool{
|
|||
}
|
||||
|
||||
impl ThreadPool {
|
||||
/// Create a new ThreadPool
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// The `new` function panics if the size is zero
|
||||
pub fn new(size: usize) -> ThreadPool {
|
||||
assert!(size > 0);
|
||||
Self{}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue