When writing codes, I ask myself which type of message should use call
, which type of message should use info
?
Below this question, there is another long-time doubt whether there is priority difference between info, cast, call
message? whether these 3 type of messages share the same queue?
Priority of messages is the same. Quick look into gen_server.erl and you will discover simple loop receiving all data.
About handle_info:
For example timeout, tcp, udp, EXIT, sytem info and many others that dont fit into handle_call or handle_cast.