mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-28 14:08:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
25
Brutal.Concurrency/Jobs/JobState.cs
Normal file
25
Brutal.Concurrency/Jobs/JobState.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
namespace Brutal.Concurrency.Jobs;
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the possible states of a JobRunner within the job system.
|
||||
///
|
||||
/// Idle - A JobRunner is not performing work and can have items queued to it or have it execute any queued jobs.
|
||||
/// Scheduled - A JobRunner has been asked to execute jobs but they haven't started running yet.
|
||||
/// Running - A JobRunner is processing its job queue and running each job.
|
||||
/// Abort - A JobRunner has been asked to stop running any more jobs.
|
||||
/// </summary>
|
||||
/// <remarks>Do not change the underlying type of JobState without looking at JobRunner's state field. It is required for correct behaviour</remarks>
|
||||
public enum JobState : int
|
||||
{
|
||||
Idle = 0,
|
||||
Scheduled = 1,
|
||||
Running = 2,
|
||||
Abort = 3,
|
||||
}
|
||||
|
||||
public enum ExecutionResult
|
||||
{
|
||||
Success, // All jobs ran and completed
|
||||
NoJobs, // No jobs were queued when ExecuteJobs was called
|
||||
Aborted, // Jobs were aborted before completion
|
||||
}
|
||||
Loading…
Reference in a new issue