6. sys and proc_lib
6 sys and proc_lib
The sys
module has functions for simple debugging of processes implemented using behaviours. It also has functions that, together with functions in the proc_lib
module, can be used to implement a special process that complies to the OTP design principles without using a standard behaviour. These functions can also be used to implement user-defined (non-standard) behaviours.
Both sys
and proc_lib
belong to the STDLIB application.
6.1 Simple Debugging
The sys
module has functions for simple debugging of processes implemented using behaviours. The code_lock
example from gen_fsm Behaviour
is used to illustrate this:
登录查看完整内容