Created
April 12, 2011 04:23
-
-
Save tdx/914926 to your computer and use it in GitHub Desktop.
Resource Acquisition Is Initialization paradigm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% @hidden | |
init([]) -> | |
Ip0 = application:get_env(riak_pb_ip), | |
Port0 = application:get_env(riak_pb_port), | |
case {Ip0,Port0} of | |
{{ok,Ip},{ok,Port}} when is_integer(Port) -> | |
self() ! {start_pool, Ip, Port}; %% need handle_info implement | |
_ -> ok | |
end, | |
{ok, undefined}. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment