domp
domp

Reputation: 771

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.

Upvotes: 2

Views: 571

Answers (1)

domp
domp

Reputation: 771

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.

Upvotes: 2

Related Questions