Somewhat related, does anyone know the difference between `erlang:suspend_process` and `sys:suspend` when trying trying to "unschedule" a process for executing reductions? Are they the same thing?
sys:suspend is more low-level. erlang:suspend_process is also tracking which processes suspended a process, so you can suspend from multiple places and if all suspending processes terminate, it will automatically unsuspend the suspended one. Probably erlang:suspend_process uses sys:suspend when counter is >1 and sys:resume when counter reaches 0.
yetihehe|1 year ago