Skip to content

Alternative to trap_exit? #30

@nathany

Description

@nathany

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions