Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative to trap_exit? #30

Open
nathany opened this issue Mar 8, 2016 · 1 comment
Open

Alternative to trap_exit? #30

nathany opened this issue Mar 8, 2016 · 1 comment

Comments

@nathany
Copy link

nathany commented Mar 8, 2016

RoomChannel and the README use trap_exit

Process.flag(:trap_exit, true)

https://github.com/chrismccord/phoenix_chat_example/blob/master/web/channels/room_channel.ex#L16

From the Phoenix documentation:

Similar to GenServer, it would also be possible :trap_exit to guarantee that terminate/2 is invoked. This practice is not encouraged though.

So what should this code be doing instead?

@DNNX
Copy link

DNNX commented May 16, 2016

I second this question. When I've been reading the code, I also got curious about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants