简体   繁体   English

如何验证erlang进程是否已休眠?

[英]How can I verify that an erlang process is hibernated?

Is there a way to verify that an erlang process has been indeed hibernated. 有没有办法验证erlang进程是否确实已经休眠过。 erlang:process_info/1 doesn't seem to provide this information and I can't think of anything else which might. erlang:process_info/1似乎没有提供这些信息,我想不出任何其他可能的信息。

Its current function should be erlang:hibernate/3 . 它的当前函数应该是erlang:hibernate/3

1> erlang:process_info(Pid, current_function).
 {current_function,{erlang, hibernate, 3}}

Here is how to do the same in Elixir: 以下是在Elixir中如何做同样的事情:

iex(2)> :erlang.process_info(pid, :current_function)
{:current_function, {:erlang, :hibernate, 3}}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM