简体   繁体   中英

What are the differences between Elixir GenEvent's handle_call and handle_event?

Please look at my answer below for the differences that I found and let me know if they are wrong or if there are more differences. Thank you.

The difference that I saw on Elixir's documentation

  • handle_call must return a reply and handle_event does not have to return a reply

It seems to me that event is used to change the state and call is used to get the state.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM