Module sbroker_nb_ask

This modules provides utility functions for messaging a process calling sbroker:ask_r/1 on a broker.

Description

This modules provides utility functions for messaging a process calling sbroker:ask_r/1 on a broker. The process is looked up by calling sbroker:nb_ask/1. If sbroker:nb_ask/1 returns {retry, 0} then no process is found.

This module can be used with via names. For example gen_server:call({via, sbroker_nb_ask, Broker}, hello) will make a gen_server call to a process calling sbroker:ask_r/1 on broker Broker.

Function Index

send/2Lookup the pid of a process calling sbroker:ask_r/1 on sbroker Broker and send Request to it.
whereis_name/1Lookup the pid of a process calling sbroker:ask_r/1 on sbroker Broker.

Function Details

send/2

send(Broker, Request) -> ok

Lookup the pid of a process calling sbroker:ask_r/1 on sbroker Broker and send Request to it.

This functions exits if sbroker:nb_ask/1 returns {retry, 0}.

whereis_name/1

whereis_name(Broker) -> Pid | undefined

Lookup the pid of a process calling sbroker:ask_r/1 on sbroker Broker. Returns Pid if sbroker:nb_ask/1 returns {go, Ref, Pid, SojournTime} and undefined on {retry, 0}.


Generated by EDoc, Jan 22 2015, 21:18:53.