Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 525 Bytes

genserver.md

File metadata and controls

17 lines (13 loc) · 525 Bytes

Gen server

  • handle_cast

    • expect no reply
  • handle_call

    • expect reply
  • Instead of spawning process, using spawn_link will link the process accordingly.

    • The supervisor can respawn that process.
    • Supervise strategy like one_for_one.
    • sys: trace to be used for tracing
    • sys:get_state() to be used for seeing the state
    • sys:replace_state() for debugging

References