git.iko.soy/typeable/postgresql-simple
on master help sign in
Change name of getNotificationIfAvailable to getNotificationNonBlocking
commit602c9544a1a6e3e5d2961ee664ea422bc0e65c1a authorLeon P Smith <leon@melding-monads.com> dateTue 29 May 2012, 22:32 (14 years ago) parent44de070
1 file changed+3−3
src/Database/PostgreSQL/Simple/Notification.hs+3−3
src/Database/PostgreSQL/Simple/Notification.hs+3−3
@@ -19,7 +19,7 @@
1919module Database.PostgreSQL.Simple.Notification
2020 ( Notification(..)
2121 , getNotification
22− , getNotificationIfAvailable
22+ , getNotificationNonBlocking
2323 ) where
2424
2525import Control.Concurrent ( threadWaitRead )
@@ -70,8 +70,8 @@ getNotification = loop False
7070-- | Non-blocking variant of 'getNotification'. Returns a single notification,
7171-- if available. If no notifications are available, returns 'Nothing'.
7272
73−getNotificationIfAvailable :: Connection -> IO (Maybe Notification)
74−getNotificationIfAvailable conn =
73+getNotificationNonBlocking :: Connection -> IO (Maybe Notification)
74+getNotificationNonBlocking conn =
7575 withConnection conn $ \c -> do
7676 mmsg <- PQ.notifies c
7777 case mmsg of