输入以下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>
“ $”,6和5-fun-3-是什么(如果您不知道我要指的是什么,我上传了一张图片来说明)在Erlang shell输出信息中是什么意思?谢谢。
在erlang中,任何用单引号引起来的内容,例如'$ancestors'
是atom
。