开发者

Get gen_fsm PID

开发者 https://www.devze.com 2023-03-07 05:04 出处:网络
I start gen_fsm: start_link() -> gen_fsm:start_link({global, ?MODULE}, [], []). How can i get it\'s P开发者_JS百科ID?

I start gen_fsm:

start_link() ->
     gen_fsm:start_link({global, ?MODULE}, [],
                   []).

How can i get it's P开发者_JS百科ID?

Thank you.


If you check the documentation for gen_fsm:start_link/3 you'll see that it returns {ok, Pid}.


You can either get it as the result of gen_fsm:start_link/3 or since it is a registered process using whereis(nameofprocess).

0

精彩评论

暂无评论...
验证码 换一张
取 消