ericmj/postgrex — pull request #29 by keichan34 (2014-12-06 03:41:08+00:00)
Title: LISTEN / NOTIFY support

Continuation of discussion on #28

I've implemented direct messaging instead of GenEvent, storing the PID of the caller on `Postgrex.Connection.listen/3` and removing it on `Postgrex.Connection.unlisten/3`.

I've implemented dead-process checking by using `Process.alive?` before sending the notification, but I wonder if there is a better way to do it? I suppose we could delete the process from the HashSet when it's detected to be dead, and when the HashSet size reduces to 0 we can send an UNLISTEN query to the server?