Ejemplo n.º 1
0
void actor_registry::put_named(atom_value key, actor value) {
  if (value)
    value->attach_functor([=](uint32_t) {
      detail::singletons::get_actor_registry()->put_named(key, invalid_actor);
    });
  exclusive_guard guard{named_entries_mtx_};
  named_entries_.emplace(key, std::move(value));
}
Ejemplo n.º 2
0
// utility function to print an exit message with custom name
void print_on_exit(const actor& hdl, const std::string& name) {
  hdl->attach_functor([=](abstract_actor* ptr, uint32_t reason) {
    aout(ptr) << name << " exited with reason " << reason << endl;
  });
}
Ejemplo n.º 3
0
// utility function to print an exit message with custom name
void print_on_exit(const actor& ptr, const std::string& name) {
  ptr->attach_functor([=](uint32_t reason) {
    aout(ptr) << name << " exited with reason " << reason << endl;
  });
}