new gproc, new feature + move to github

Ulf Wiger ulf.wiger@REDACTED
Thu Feb 11 11:46:34 CET 2010

Given the recent discussion about gproc, and my background task
of migrating my projects to github, I have committed a new version
of gproc:

 From now on, unless people object, I will update the git version.

The new feature in this gproc version is

gproc:await(Key, Timeout) -> {Pid, Value} | error(timeout)

Currently only for local names, the function waits for a name to be
registered and then returns the pid of the registered process.
Given that gproc allows processes to register multiple names, this can
serve as a simple resource broker.

There is also a non-blocking version, gproc:nb_wait(Key) -> Ref.
Gproc will send a message, {gproc, Ref, registered, {Key, Pid, Value}}
once the name appears.

The feature doesn't add any execution overhead to name registration,
except when there are processes waiting for the name, in which case
there will obviously be a cost for notifying them.

Ulf W
Ulf Wiger
CTO, Erlang Solutions Ltd, formerly Erlang Training & Consulting Ltd



Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.

More information about the erlang-questions mailing list