typename basic_otp_mailbox_registry<Alloc, Mutex>::mailbox_ptr
basic_otp_mailbox_registry<Alloc, Mutex>::get(const eterm<Alloc>& a_proc) const
    throw (err_bad_argument, err_no_process)
{
    switch (a_proc.type()) {
        case ATOM:  return get(a_proc.to_atom());
        case PID:   return get(a_proc.to_pid());
        default:    throw err_bad_argument("Unknown process identifier", a_proc);
    }
}
Exemplo n.º 2
0
 bool match(const eterm<Alloc>& pattern, varbind<Alloc>* binding) const
     throw (err_unbound_variable)
 {
     if (is_any()) return true;
     if (!binding) return false;
     const eterm<Alloc>* value = binding->find(name());
     if (value)
         return check_type(value->type()) ? value->match(pattern, binding) : false;
     if (!check_type(pattern.type()))
         return false;
     // Bind the variable
     eterm<Alloc> et;
     binding->bind(name(), pattern.subst(et, binding) ? et : pattern);
     return true; 
 }