C++ Actor Framework 1.0.0
|
Enumerations | |
enum class | caf::spawn_options : int { no_flags = 0x00 , link_flag = 0x01 , monitor_flag = 0x02 , detach_flag = 0x04 , hide_flag = 0x08 , priority_aware_flag = 0x20 , lazy_init_flag = 0x40 } |
Stores options passed to the spawn function family. | |
Functions | |
constexpr spawn_options | caf::operator+ (spawn_options x, spawn_options y) |
Concatenates two spawn_options . | |
constexpr bool | caf::has_lazy_init_flag (spawn_options opts) |
Causes spawn to call `self->link_to(...) immediately / after the new actor was spawned. | |
Variables | |
constexpr spawn_options | caf::no_spawn_options = spawn_options::no_flags |
Denotes default settings. | |
constexpr spawn_options | caf::monitored = spawn_options::monitor_flag |
|
constexpr |
Causes spawn
to call `self->link_to(...) immediately / after the new actor was spawned.
constexpr spawn_options linked = spawn_options::link_flag;
/ Causes the new actor to opt out of the cooperative scheduling. constexpr spawn_options detached = spawn_options::detach_flag;
/ Causes the runtime to ignore the new actor in await_all_actors_done()
. constexpr spawn_options hidden = spawn_options::hide_flag;
/ Causes the new actor to delay its / initialization until a message arrives. constexpr spawn_options lazy_init = spawn_options::lazy_init_flag;
/ Checks whether haystack
contains needle
. constexpr bool has_spawn_option(spawn_options haystack, spawn_options needle) { return (static_cast<int>(haystack) & static_cast<int>(needle)) != 0; }
/ Checks whether the detached
flag is set in opts
. constexpr bool has_detach_flag(spawn_options opts) { return has_spawn_option(opts, detached); }
/ Checks whether the priority_aware
flag is set in opts
. constexpr bool has_priority_aware_flag(spawn_options) { return true; }
/ Checks whether the hidden
flag is set in opts
. constexpr bool has_hide_flag(spawn_options opts) { return has_spawn_option(opts, hidden); }
/ Checks whether the linked
flag is set in opts
. constexpr bool has_link_flag(spawn_options opts) { return has_spawn_option(opts, linked); }
/ Checks whether the monitored
flag is set in opts
. constexpr bool has_monitor_flag(spawn_options opts) { return has_spawn_option(opts, spawn_options::monitor_flag); }
/ Checks whether the lazy_init
flag is set in opts
.