summaryrefslogtreecommitdiffstats
path: root/src/runtime/status.rs
blob: 14cd038bcc5c9fda01608127b3e6175f38c4becf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use crate::runtime::RuntimeError;

/// The threads status.
#[derive(Debug, PartialEq, Eq)]
#[allow(variant_size_differences)]
#[allow(clippy::exhaustive_enums)]
pub(crate) enum Status {
	/// Thread is new, and hasn't yet started. This is the initial status of all threads.
	New,
	/// The thread is busy processing.
	Busy,
	/// The thread is waiting for more work to complete.
	Waiting,
	/// The thread is finished. This is a final state.
	Ended,
	#[allow(unused)]
	/// The thread has requested all threads pause.
	RequestPause,
	#[allow(unused)]
	/// The thread has requested all threads resume.
	RequestResume,
	/// The thread has requested all threads end.
	RequestEnd,
	/// The thread has errored with provided `RuntimeError`. This is a final state.
	Error(RuntimeError),
}