pub fn stop(&self) -> Result<(), Error> {
		let stp = STATIC_THREAD_POOL.write().map_err(|e| {
			let error: Error = ErrorKind::InternalError(format!(
				"static thread pool lock error: {}",
				e.to_string()
			))
			.into();
			error
		})?;

		let tp = stp.get(&self.id);
		match tp {
			Some(tp) => tp.stop()?,
			None => {
				return Err(ErrorKind::InternalError(format!(
					"static thread pool id = {} doesn't exist error",
					self.id
				))
				.into())
			}
		}
		Ok(())
	}
/// Stop this thread pool free all resources used by the thread pool and terminate
/// all running threads.
Stop this thread pool free all resources used by the thread pool and terminate
all running threads.
Stop this thread pool free all resources used by the thread pool and terminate all running threads .
pub fn stop(&self) -> Result<(), Error> {
		let stp = STATIC_THREAD_POOL.write().map_err(|e| {
			let error: Error = ErrorKind::InternalError(format!(
				"static thread pool lock error: {}",
				e.to_string()
			))
			.into();
			error
		})?;
		let tp = stp.get(&self.id);
		match tp {
			Some(tp) => tp.stop()?,
			None => {
				return Err(ErrorKind::InternalError(format!(
					"static thread pool id = {} doesn't exist error",
					self.id
				))
				.into())
			}
		}
		Ok(())
	}
pub fn stop ( & self ) -> Result < ( ) , Error > { let stp = STATIC_THREAD_POOL . write ( ) . map_err ( | e | { let error : Error = ErrorKind :: InternalError ( format ! ( " " e to_string ( ) ) ) . into ( ) ; error } ) ? ; let tp = stp . get ( & self . id ) ; match tp { Some ( tp ) => tp . stop ( ) ? , None => { return Err ( ErrorKind :: InternalError ( format ! ( " " self id ) ) . into ( ) ) } } Ok ( ( ) ) }
Stop this thread pool free all resources used by the thread pool and terminate
all running threads.
Stop this thread pool free all resources used by the thread pool and terminate all running threads .
&self
&self