A sum-type of all supported schedulers.
More...
#include <numapp/scheduler.hpp>
|
| template<class T> |
| constexpr bool | HoldsScheduler () const noexcept |
| | Query the held scheduler.
|
| |
| template<class T> |
| constexpr T | GetScheduler () const |
| | Get the held scheduler.
|
| |
|
SchedulerVariant const & | Get () const noexcept |
| | Get the underlying scheduler.
|
| |
|
| operator SchedulerVariant () const noexcept |
| | Enable implicit conversion to underlying SchedulerVariant.
|
| |
|
(Note that these are not member symbols.)
|
| std::ostream & | operator<< (std::ostream &os, Scheduler const &scheduler) |
| | Formats scheduler and inserts it to os.
|
| |
|
Applies scheduler to specified thread.
|
| std::error_code | Apply (pid_t thread, Scheduler const &scheduler) noexcept |
| | Apply variadic scheduler to specified thread.
|
| |
|
Applies specified scheduler to current thread.
|
| std::error_code | Apply (Scheduler const &scheduler) noexcept |
| | Apply variadic scheduler to this thread.
|
| |
A sum-type of all supported schedulers.
- Related man-page(s):
-
Definition at line 449 of file scheduler.hpp.
◆ GetScheduler()
template<class T>
| T numapp::Scheduler::GetScheduler |
( |
| ) |
const |
|
inlinenodiscardconstexpr |
Get the held scheduler.
idle_scheduler = scheduler.GetScheduler<IdleScheduler>(); // may throw
- Exceptions
-
| std::bad_variant_access | if T does not match held scheduler. |
Definition at line 490 of file scheduler.hpp.
◆ HoldsScheduler()
template<class T>
| bool numapp::Scheduler::HoldsScheduler |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
Query the held scheduler.
if (scheduler.HoldsScheduler<IdleScheduler>()) {
// ...
}
Definition at line 478 of file scheduler.hpp.
◆ MakeFromActive() [1/2]
| static Scheduler numapp::Scheduler::MakeFromActive |
( |
| ) |
|
|
staticnodiscard |
Return active scheduler policy for this thread.
- Exceptions
-
| std::system_error | with std::errc::not_supported error if unknown policy is found.. |
◆ MakeFromActive() [2/2]
| static Scheduler numapp::Scheduler::MakeFromActive |
( |
pid_t | pid | ) |
|
|
staticnodiscard |
Return active scheduler policy for thread with pid.
- Exceptions
-
| std::system_error | with std::errc::not_supported error if unknown policy is found.. |
◆ operator<<()
| std::ostream & operator<< |
( |
std::ostream & | os, |
|
|
Scheduler const & | scheduler ) |
|
related |
Formats scheduler and inserts it to os.
- Parameters
-
| os | output stream to insert into. |
| scheduler | Scheduler to format. |
- Returns
- os
The documentation for this class was generated from the following file: