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:
http://svn.ulf.wiger.net/gproc/branches/0912/gproc
http://github.com/uwiger/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.
BR,
Ulf W
--
Ulf Wiger
CTO, Erlang Solutions Ltd, formerly Erlang Training & Consulting Ltd
http://www.erlang-solutions.com
---------------------------------------------------
---------------------------------------------------
WE'VE CHANGED NAMES!
Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.
www.erlang-solutions.com
More information about the erlang-questions
mailing list