git.iko.soy/typeable/postgresql-simple
on master help sign in
Mention concurrency in docs of getNotification
c61ef23Leon P Smith
src/Database/PostgreSQL/Simple/Notification.hs+4
@@ -68,6 +68,10 @@ convertNotice PQ.Notify{..}
68
68
69-- | Returns a single notification. If no notifications are available,
69-- | Returns a single notification. If no notifications are available,
70-- 'getNotification' blocks until one arrives.
70-- '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.
71
75
72getNotification :: Connection -> IO Notification
76getNotification :: Connection -> IO Notification
73getNotification conn = join $ withConnection conn fetch
77getNotification conn = join $ withConnection conn fetch