的handle_call功能gen_server是:如果handle_call函數中存在「record = State」,會發生什麼情況?
Module:handle_call(Request, From, State) -> Result
但我遇到一個handle_call功能是這樣的:
handle_call(info, _From, #yuv{decoder = undefined} = State) ->
{reply, [], State};
handle_call(info, _From, #yuv{decoder = Decoder} = State) ->
{reply, av_decoder:info(Decoder), State};
handle_call(_Request, _From, State) ->
{noreply, ok, State}.
我想知道發生了什麼事?這是在我頭上
BTW:將YUV記錄是:
-record(yuv, {
host,
name,
media,
decoder,
consumer
}).