diff --git a/Modules/Task/src/Error.rs b/Modules/Task/src/Error.rs index f697467..da9400b 100644 --- a/Modules/Task/src/Error.rs +++ b/Modules/Task/src/Error.rs @@ -1,7 +1,20 @@ +use std::sync::PoisonError; + +pub type Result = std::result::Result; + #[derive(Debug, Clone)] pub enum Error_type { Invalid_task_identifier, Failed_to_create_thread, No_thread_for_task, Failed_to_spawn_thread, + Poisoned_lock, + Invalid_environment_variable, + Too_many_tasks, +} + +impl From> for Error_type { + fn from(_: PoisonError) -> Self { + Error_type::Poisoned_lock + } }