Return error when create ThreadPool failed

This commit is contained in:
2025-09-13 19:05:45 +08:00
parent e5e437b1e3
commit 01477b31a0
2 changed files with 12 additions and 7 deletions

View File

@@ -345,7 +345,7 @@ impl<'a> CbgDecoder<'a> {
has_alpha: AtomicBool::new(false),
});
let thread_pool = ThreadPool::new(self.workers, Some("cbg-decoder-worker-"));
let thread_pool = ThreadPool::new(self.workers, Some("cbg-decoder-worker-"))?;
let mut dst = 0i32;
for i in 0..y_blocks {