git.iko.soy/typeable/postgresql-simple
on master help sign in
Mention concurrency in docs of getNotification
commitc61ef23dbcb61f015caef96d59f52fa1cecc31e7 authorLeon P Smith <leon@melding-monads.com> dateSat 26 Dec 2015, 21:11 (11 years ago) parent4f6066d
1 file changed+4
src/Database/PostgreSQL/Simple/Notification.hs+4
src/Database/PostgreSQL/Simple/Notification.hs+4
@@ -68,6 +68,10 @@ convertNotice PQ.Notify{..}
6868
6969-- | Returns a single notification. If no notifications are available,
7070-- 'getNotification' blocks until one arrives.
71+--
72+-- It is safe to call 'getNotification' on a connection that is concurrently
73+-- being used for other purposes, note however that PostgreSQL does not
74+-- deliver notifications while a connection is inside a transaction.
7175
7276getNotification :: Connection -> IO Notification
7377getNotification conn = join $ withConnection conn fetch