packages feed

hedis 0.9.2 → 0.9.3

raw patch · 4 files changed

+14/−9 lines, 4 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

CHANGELOG view
@@ -1,5 +1,9 @@ # Changelog for Hedis +## 0.9.2++* Added multithreaded pub/sub message processing (see PR #77)+ ## 0.9.0  * Merge in a fresh commands.json and a set of new commands
hedis.cabal view
@@ -1,5 +1,5 @@ name:               hedis-version:            0.9.2+version:            0.9.3 synopsis:     Client library for the Redis datastore: supports full command set,     pipelining.
src/Database/Redis/PubSub.hs view
@@ -317,14 +317,22 @@ -- exactly reflect the subscribed channels in the Redis server, because there is a delay -- between adding or removing a channel in the 'PubSubController' and when Redis receives -- and processes the subscription change request.+#if __GLASGOW_HASKELL__ < 710+currentChannels :: (MonadIO m, Functor m) => PubSubController -> m [RedisChannel]+#else currentChannels :: MonadIO m => PubSubController -> m [RedisChannel]+#endif currentChannels ctrl = HM.keys <$> (liftIO $ atomically $ readTVar $ callbacks ctrl)  -- | Get the list of current pattern channels in the 'PubSubController'.  WARNING! This might not -- exactly reflect the subscribed channels in the Redis server, because there is a delay -- between adding or removing a channel in the 'PubSubController' and when Redis receives -- and processes the subscription change request.+#if __GLASGOW_HASKELL__ < 710+currentPChannels :: (MonadIO m, Functor m) => PubSubController -> m [RedisPChannel]+#else currentPChannels :: MonadIO m => PubSubController -> m [RedisPChannel]+#endif currentPChannels ctrl = HM.keys <$> (liftIO $ atomically $ readTVar $ pcallbacks ctrl)  -- | Add channels into the 'PubSubController', and if there is an active 'pubSubForever', send the subscribe
test/PubSubTest.hs view
@@ -1,22 +1,15 @@-{-# LANGUAGE CPP, OverloadedStrings #-}+{-# LANGUAGE CPP, OverloadedStrings, DeriveDataTypeable #-} module PubSubTest (testPubSubThreaded) where -#if __GLASGOW_HASKELL__ < 710-import Control.Applicative-import Data.Monoid (mappend)-#endif import Control.Concurrent import Control.Monad import Control.Concurrent.Async import Control.Exception import Data.Typeable---import Control.Monad.Trans---import Data.Time import qualified Data.List import Data.Text import Data.ByteString import Control.Concurrent.STM---import Data.Time.Clock.POSIX import qualified Test.Framework as Test import qualified Test.Framework.Providers.HUnit as Test (testCase) import qualified Test.HUnit as HUnit