libcaf  0.13.2
Classes
Actor creation.

Classes

class  caf::spawn_options
 
template<class C , spawn_options Os = no_spawn_options, class... Ts>
actor caf::spawn (Ts &&...xs)
 Returns a new actor of type C using xs... as constructor arguments. More...
 
template<spawn_options Os = no_spawn_options, class... Ts>
actor caf::spawn (Ts &&...xs)
 Returns a new functor-based actor. More...
 
template<class C , spawn_options Os = no_spawn_options, class Groups , class... Ts>
actor caf::spawn_in_groups (const Groups &grps, Ts &&...xs)
 Returns a new actor that immediately, i.e., before this function returns, joins grps of type C using xs as constructor arguments.
 
template<class C , spawn_options Os = no_spawn_options, class... Ts>
actor caf::spawn_in_groups (std::initializer_list< group > grps, Ts &&...xs)
 
template<class C , spawn_options Os = no_spawn_options, class... Ts>
actor caf::spawn_in_group (const group &grp, Ts &&...xs)
 Returns a new actor that immediately, i.e., before this function returns, joins grp of type C using xs as constructor arguments.
 
template<spawn_options Os = no_spawn_options, class Groups , class... Ts>
actor caf::spawn_in_groups (const Groups &grps, Ts &&...xs)
 Returns a new actor that immediately, i.e., before this function returns, joins grps. More...
 
template<spawn_options Os = no_spawn_options, class... Ts>
actor caf::spawn_in_groups (std::initializer_list< group > grps, Ts &&...xs)
 
template<spawn_options Os = no_spawn_options, class... Ts>
actor caf::spawn_in_group (const group &grp, Ts &&...xs)
 Returns a new actor that immediately, i.e., before this function returns, joins grp. More...
 
template<class C , spawn_options Os = no_spawn_options, class... Ts>
actor_handle_from_signature_list< typename C::signatures >::type caf::spawn_typed (Ts &&...xs)
 Returns a new typed actor of type C using xs... as constructor arguments. More...
 
template<spawn_options Os, typename BeforeLaunch , typename F , class... Ts>
infer_typed_actor_handle< typename detail::get_callable_trait< F >::result_type, typename detail::tl_head< typename detail::get_callable_trait< F >::arg_types >::type >::type caf::spawn_typed_functor (execution_unit *eu, BeforeLaunch cb, F fun, Ts &&...xs)
 Spawns a typed actor from a functor .
 
template<spawn_options Os = no_spawn_options, typename F , class... Ts>
infer_typed_actor_handle< typename detail::get_callable_trait< F >::result_type, typename detail::tl_head< typename detail::get_callable_trait< F >::arg_types >::type >::type caf::spawn_typed (F fun, Ts &&...xs)
 Returns a new typed actor from a functor. More...
 

Detailed Description

Function Documentation

template<class C , spawn_options Os = no_spawn_options, class... Ts>
actor caf::spawn ( Ts &&...  xs)

Returns a new actor of type C using xs... as constructor arguments.

The behavior of spawn can be modified by setting Os, e.g., to opt-out of the cooperative scheduling.

Examples:
announce_1.cpp, announce_2.cpp, announce_3.cpp, announce_4.cpp, announce_5.cpp, dancing_kirby.cpp, and hello_world.cpp.
template<spawn_options Os = no_spawn_options, class... Ts>
actor caf::spawn ( Ts &&...  xs)

Returns a new functor-based actor.

The first argument must be the functor, the remainder of xs... is used to invoke the functor. The behavior of spawn can be modified by setting Os, e.g., to opt-out of the cooperative scheduling.

template<spawn_options Os = no_spawn_options, class... Ts>
actor caf::spawn_in_group ( const group &  grp,
Ts &&...  xs 
)

Returns a new actor that immediately, i.e., before this function returns, joins grp.

The first element of xs must be the functor, the remaining arguments its arguments.

template<spawn_options Os = no_spawn_options, class Groups , class... Ts>
actor caf::spawn_in_groups ( const Groups &  grps,
Ts &&...  xs 
)

Returns a new actor that immediately, i.e., before this function returns, joins grps.

The first element of xs must be the functor, the remaining arguments its arguments.

template<class C , spawn_options Os = no_spawn_options, class... Ts>
actor_handle_from_signature_list<typename C::signatures>::type caf::spawn_typed ( Ts &&...  xs)

Returns a new typed actor of type C using xs... as constructor arguments.

Examples:
dining_philosophers.cpp.
template<spawn_options Os = no_spawn_options, typename F , class... Ts>
infer_typed_actor_handle< typename detail::get_callable_trait<F>::result_type, typename detail::tl_head< typename detail::get_callable_trait<F>::arg_types >::type>::type caf::spawn_typed ( fun,
Ts &&...  xs 
)

Returns a new typed actor from a functor.

The first element of xs must be the functor, the remaining arguments are used to invoke the functor. This function delegates its arguments to spawn_typed_functor.