{"record":{"id":"391583f180c487cd","repo":"atuinsh/atuin","slug":"thread-pool-failed-to-shutdown-properly","errorCode":null,"errorMessage":"thread pool failed to shutdown properly","messagePattern":"thread pool failed to shutdown properly","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/atuin-nucleo/src/lib.rs","lineNumber":516,"sourceCode":"            }\n            let cleared = self.state.cleared();\n            if cleared {\n                inner.items = self.items.clone();\n            }\n            self.pool.spawn(move || unsafe { inner.run(status, cleared) })\n        }\n        Status { changed, running }\n    }\n}\n\nimpl<T: Sync + Send> Drop for Nucleo<T> {\n    fn drop(&mut self) {\n        // we ensure the worker quits before dropping items to ensure that\n        // the worker can always assume the items outlive it\n        self.canceled.store(true, atomic::Ordering::Relaxed);\n        let lock = self.worker.try_lock_for(Duration::from_secs(1));\n        if lock.is_none() {\n            unreachable!(\"thread pool failed to shutdown properly\")\n        }\n    }\n}\n","sourceCodeStart":498,"sourceCodeEnd":520,"githubUrl":"https://github.com/atuinsh/atuin/blob/15fe1318f1df51de604262eb50734c9883d48e7b/crates/atuin-nucleo/src/lib.rs#L498-L520","documentation":"Error \"thread pool failed to shutdown properly\" thrown in atuinsh/atuin.","triggerScenarios":"Fires when the nucleo worker thread pool does not terminate cleanly during shutdown of the search engine.","commonSituations":"See trigger scenarios.","solutions":["Check the log for a stuck worker task; retry the operation and report the issue if it repeats."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"15fe1318f1df51de604262eb50734c9883d48e7b","analyzedAt":"2026-08-19T08:56:57.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}