-
Notifications
You must be signed in to change notification settings - Fork 16
Priority
WorkPriority signifies the priority level of the works that needs to be undertaken.
Works with higher priority (represented by higher numerical values) are executed first. This facilitates a more efficient and organized execution of works, particularly in situations where certain works are more critical or time-sensitive than others. By setting the WorkPriority, the order and speed of work execution in the applications can be effectively controlled.
powerPool.QueueWorkItem(() =>
{
// Do something
}, new WorkOption()
{
WorkPriority = 2
});ThreadPriority pecifies the scheduling priority of a System.Threading.Thread.
However, handling this attribute requires a degree of caution. Modifying the ThreadPriority could potentially lead to problems such as thread starvation or priority inversion, which could detrimentally affect the application's performance or even cause it to become unresponsive. Therefore, it is important to tread carefully while setting the ThreadPriority, ensuring its implications are thoroughly understood.
powerPool.QueueWorkItem(() =>
{
// Do something
}, new WorkOption()
{
ThreadPriority = ThreadPriority.Highest
});- Sync | Async
- Pool Control | Work Control
- Divide And Conquer
- Thread Pool Sizing
- Work Callback | Default Callback
- Rejection Policy
- Parallel Execution
- Work Priority | Thread Priority
- Error Handling
- Work Timeout | Cumulative Work Timeout
- Work Dependency
- Work Group
- Events
- Runtime Status
- Running Timer
- Queue Type (FIFO | LIFO | Deque | Custom)
Core
Results
Options