shell info
输入以下Erlang shell命令时:
proc_lib:spawn(fun() -> io:format("~p~n",[process_info(self())]) end).
Erlang将在图片中显示以下信息。
[{current_function,{erl_eval,do_apply,6}},
{initial_call,{proc_lib,init_p,3}},
{status,running},
{message_queue_len,0},
{messages,[]},
{links,[]},
{dictionary,[{'$ancestors',[<0.32.0>]},
{'$initial_call',{erl_eval,'-expr/5-fun-3-',0}}]},
{trap_exit,false},
{error_handler,error_handler},
{priority,normal},
{group_leader,<0.25.0>},
{total_heap_size,233},
{heap_size,233},
{stack_size,27},
{reductions,72},
{garbage_collection,[{min_bin_vheap_size,46422},
{min_heap_size,233},
{fullsweep_after,65535},
{minor_gcs,0}]},
{suspending,[]}]
<0.34.0>
在Erlang shell输出信息中,“$"、6和5-fun-3-(如果你不知道我指的是什么,我已经上传了一张图片来说明)是什么意思?谢谢。
1条答案
按热度按时间oipij1gg1#
在Erlang中,任何用单引号括起来的东西,例如
'$ancestors'
就是atom
。