Skip to content

Module dev_process_worker.erl

A long-lived process worker that keeps state in memory between calls.

Description

Implements the interface of hb_ao to receive and respond to computation requests regarding a process as a singleton.

Function Index

await/5Await a resolution from a worker executing the process@1.0 device.
group/3Returns a group name for a request.
grouper_test/0*
info_test/0*
notify_compute/4Notify any waiters for a specific slot of the computed results.
notify_compute/5*
process_to_group_name/2*
send_notification/4*
server/3Spawn a new worker process.
stop/1Stop a worker process.
test_init/0*

Function Details

await/5

await(Worker, GroupName, Msg1, Msg2, Opts) -> any()

Await a resolution from a worker executing the process@1.0 device.

group/3

group(Msg1, Msg2, Opts) -> any()

Returns a group name for a request. The worker is responsible for all computation work on the same process on a single node, so we use the process ID as the group name.

grouper_test/0 *

grouper_test() -> any()

info_test/0 *

info_test() -> any()

notify_compute/4

notify_compute(GroupName, SlotToNotify, Msg3, Opts) -> any()

Notify any waiters for a specific slot of the computed results.

notify_compute/5 *

notify_compute(GroupName, SlotToNotify, Msg3, Opts, Count) -> any()

process_to_group_name/2 *

process_to_group_name(Msg1, Opts) -> any()

send_notification/4 *

send_notification(Listener, GroupName, SlotToNotify, Msg3) -> any()

server/3

server(GroupName, Msg1, Opts) -> any()

Spawn a new worker process. This is called after the end of the first execution of hb_ao:resolve/3, so the state we are given is the already current.

stop/1

stop(Worker) -> any()

Stop a worker process.

test_init/0 *

test_init() -> any()