Advertisement
Guest User

ciukes

a guest
May 27th, 2008
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. -module(pp).
  2. -behaviour(gen_server).
  3. -compile(export_all).
  4. -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
  5. terminate/2, code_change/3]).
  6.  
  7. init([]) -> {ok, "value"}.
  8.  
  9. start_link() -> gen_server:start_link({local, ?MODULE}, ?MODULE, [], [{debug,[trace]}]).
  10. start() -> gen_server:start({local, ?MODULE}, ?MODULE, [], [{debug,[trace]}]).
  11. alloc(Pid) -> gen_server:call(?MODULE, {alloc, Pid}).
  12.  
  13. handle_call({alloc, Pid}, From, State) ->
  14. {noreply, State}.
  15.  
  16. handle_cast(_Msg, State) -> {noreply, State}.
  17. handle_info(_Info, State) -> {noreply, State}.
  18. terminate(_Reason, _State) -> ok.
  19. code_change(_OldVsn, State, Extra) -> {ok, State}.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement