How can I verify that the erlang process is in sleep mode?

Is there any way to verify that the erlang process was indeed sleeping. erlang:process_info/1 does not seem to provide this information, and I cannot come up with anything that could.

+5
source share
2 answers

Its current function should be erlang:hibernate/3 .

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

Here's how to do it in Elixir:

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

Source: https://habr.com/ru/post/1275584/


All Articles