vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

Variable TaskSettings.priority

Scheduling priority of the task

struct TaskSettings
{
  // ...
  uint priority = 65536u;
  // ...
}

The priority of a task is roughly proportional to the amount of times it gets scheduled in comparison to competing tasks. For example, a task with priority 100 will be scheduled every 10 rounds when competing against a task with priority 1000.

The default priority is defined by basePriority and has a value of 65536. Priorities should be computed relative to basePriority.

A task with a priority of zero will only be executed if no other non-zero task is competing.

Authors

Sönke Ludwig

Copyright

© 2012-2020 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.