[erlang-questions] *current* value?

YC <>
Wed Oct 17 07:03:05 CEST 2007


Hi all -

Is process dictionary the only built-in language level facility to return
context-dependent data, in Erlang?  e.g., self() returns the "current"
process.

%% hopefully only assign once...
set_current_request(Req) ->
  set(current_request, Req).

%% retrieve the request.
current_request() ->
  get(current_request).

Please let me know if there are better ways of accomplishing the goal.
Thanks,
yc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20071016/e18a674a/attachment.html>


More information about the erlang-questions mailing list