Update lib.rs

pull/891/head
qwer252 1 week ago committed by GitHub
parent 294fbbbced
commit d4f9f1aa12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2,13 +2,13 @@ pub struct ThreadPool;
// ANCHOR: here // ANCHOR: here
impl ThreadPool { impl ThreadPool {
/// Create a new ThreadPool. /// 创建一个新的线程池。
/// ///
/// The size is the number of threads in the pool. /// size 是池中线程的数量。
/// ///
/// # Panics /// # Panics
/// ///
/// The `new` function will panic if the size is zero. /// 如果 size 为 0 `new` 方法会 panic。
pub fn new(size: usize) -> ThreadPool { pub fn new(size: usize) -> ThreadPool {
assert!(size > 0); assert!(size > 0);

Loading…
Cancel
Save