Esempio n. 1
0
 typename infer_handle_from_fun<F>::type
 spawn(F fun, Ts&&... xs) {
   constexpr auto os = make_unbound(Os);
   auto res = spawn_functor<os>(host(), empty_before_launch_callback{},
                                std::move(fun), std::forward<Ts>(xs)...);
   return eval_opts(Os, std::move(res));
 }
Esempio n. 2
0
 actor spawn_in_groups(const Groups& grps, Ts&&... xs) {
   constexpr auto os = make_unbound(Os);
   auto res = spawn_class<T, os>(host(),
                                 groups_subscriber<
                                   decltype(std::begin(grps))
                                 >{std::begin(grps), std::end(grps)},
                                 std::forward<Ts>(xs)...);
   return eval_opts(Os, std::move(res));
 }
Esempio n. 3
0
 CAF_DEPRECATED typename actor_handle_from_signature_list<
   typename T::signatures
 >::type
 spawn_typed(Ts&&... xs) {
   constexpr auto os = make_unbound(Os);
   auto res = spawn_class<T, os>(host(), empty_before_launch_callback{},
                   std::forward<Ts>(xs)...);
   return eval_opts(Os, std::move(res));
 }
Esempio n. 4
0
 CAF_DEPRECATED typename 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
 spawn_typed(F fun, Ts&&... xs) {
   constexpr auto os = make_unbound(Os);
   auto res = caf::spawn_typed_functor<os>(host(),
                                           empty_before_launch_callback{},
                                           std::move(fun),
                                           std::forward<Ts>(xs)...);
   return eval_opts(Os, std::move(res));
 }
Esempio n. 5
0
 actor spawn_in_group(const group& grp, F fun, Ts&&... xs) {
   actor_config cfg{context()};
   auto first = &grp;
   return eval_opts(Os, system().spawn_in_groups_impl<make_unbound(Os)>(cfg, first, first + 1, fun, std::forward<Ts>(xs)...));
 }
Esempio n. 6
0
 actor spawn_in_groups(const Groups& gs, Ts&&... xs) {
   actor_config cfg{context()};
   return eval_opts(Os, system().spawn_in_groups_impl<T, make_unbound(Os)>(cfg, gs.begin(), gs.end(), std::forward<Ts>(xs)...));
 }
Esempio n. 7
0
 actor spawn_in_groups(std::initializer_list<group> gs, F fun, Ts&&... xs) {
   actor_config cfg{context()};
   return eval_opts(Os, system().spawn_in_groups_impl<make_unbound(Os)>(cfg, gs.begin(), gs.end(), fun, std::forward<Ts>(xs)...));
 }
Esempio n. 8
0
 infer_handle_from_fun_t<F> spawn(F fun, Ts&&... xs) {
   actor_config cfg{context()};
   return eval_opts(Os, system().spawn_functor<make_unbound(Os)>(cfg, fun, std::forward<Ts>(xs)...));
 }
Esempio n. 9
0
 infer_handle_from_state_t<T> spawn() {
   using impl = composable_behavior_based_actor<T>;
   actor_config cfg{context()};
   return eval_opts(Os, system().spawn_class<impl, make_unbound(Os)>(cfg));
 }
Esempio n. 10
0
 infer_handle_from_class_t<T> spawn(Ts&&... xs) {
   actor_config cfg{context()};
   return eval_opts(Os, system().spawn_class<T, make_unbound(Os)>(cfg, std::forward<Ts>(xs)...));
 }
Esempio n. 11
0
 actor spawn_in_group(const group& grp, Ts&&... args) {
   constexpr auto os = make_unbound(Os);
   auto res = spawn_class<C, os>(host(), group_subscriber{grp},
                   std::forward<Ts>(args)...);
   return eval_opts(Os, std::move(res));
 }
Esempio n. 12
0
 actor spawn(Ts&&... args) {
   constexpr auto os = make_unbound(Os);
   auto res = spawn_functor<os>(host(), empty_before_launch_callback{},
                  std::forward<Ts>(args)...);
   return eval_opts(Os, std::move(res));
 }