Module hb_name.erl¶
An abstraction for name registration/deregistration in HyperBEAM.
Description¶
Its motivation is to provide a way to register names that are not necessarily
atoms, but can be any term (for example: hashpaths or process@1.0
IDs).
An important characteristic of these functions is that they are atomic:
There can only ever be one registrant for a given name at a time.
Function Index¶
all/0 | List the names in the registry. |
all_test/0* | |
atom_test/0* | |
basic_test/1* | |
cleanup_test/0* | |
concurrency_test/0* | |
dead_process_test/0* | |
ets_lookup/1* | |
lookup/1 | Lookup a name -> PID. |
register/1 | Register a name. |
register/2 | |
spawn_test_workers/1* | |
start/0 | |
start_ets/0* | |
term_test/0* | |
unregister/1 | Unregister a name. |
wait_for_cleanup/2* |
Function Details¶
all/0¶
all() -> any()
List the names in the registry.
all_test/0 *¶
all_test() -> any()
atom_test/0 *¶
atom_test() -> any()
basic_test/1 *¶
basic_test(Term) -> any()
cleanup_test/0 *¶
cleanup_test() -> any()
concurrency_test/0 *¶
concurrency_test() -> any()
dead_process_test/0 *¶
dead_process_test() -> any()
ets_lookup/1 *¶
ets_lookup(Name) -> any()
lookup/1¶
lookup(Name) -> any()
Lookup a name -> PID.
register/1¶
register(Name) -> any()
Register a name. If the name is already registered, the registration will fail. The name can be any Erlang term.
register/2¶
register(Name, Pid) -> any()
spawn_test_workers/1 *¶
spawn_test_workers(Name) -> any()
start/0¶
start() -> any()
start_ets/0 *¶
start_ets() -> any()
term_test/0 *¶
term_test() -> any()
unregister/1¶
unregister(Name) -> any()
Unregister a name.
wait_for_cleanup/2 *¶
wait_for_cleanup(Name, Retries) -> any()