Donner SVG main
0.8.0 ยท 766e862a0.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
WorkerPolicy.h File Reference

Platform defaults for scheduler worker threads. More...

#include <algorithm>
#include <cstddef>
#include <iosfwd>
#include <ostream>
#include "donner/base/Utils.h"
Include dependency graph for WorkerPolicy.h:
This graph shows which files directly or indirectly include this file:

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Enumerations

enum class  donner::tasks::WorkerQos {
  kInteractive ,
  kUserInitiated ,
  kDefault
}
 Requested Apple scheduling class. Other platforms retain inherited scheduling.

Functions

std::ostream & donner::tasks::operator<< (std::ostream &os, WorkerQos qos)
 Prints a worker QoS for diagnostics.
std::size_t donner::tasks::DefaultWorkerCount ()
 Number of workers for the CPUs available to the caller, reserving one for the caller itself.
constexpr std::size_t donner::tasks::detail::WorkerCountForProcessors (std::size_t available)
 Reserve a caller and choose between one and 32 workers even if detection returns zero.
int donner::tasks::detail::TrySetCurrentWorkerQos (WorkerQos qos)
 Returns the platform error code for a refused scheduling hint, or zero.

Detailed Description

Platform defaults for scheduler worker threads.