packages feed

nqe 0.6.2 → 0.6.3

raw patch · 3 files changed

+15/−3 lines, 3 files

Files

CHANGELOG.md view
@@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 0.6.3+### Changed+- Add `publish` and `publishSTM` functions.+ ## 0.6.2 ### Changed - Change license to MIT.
nqe.cabal view
@@ -4,12 +4,12 @@ -- -- see: https://github.com/sol/hpack ----- hash: 7754aaa97f2f3e89433744c32f9954f25dc83ade6be3af578514cb0eb9631f2a+-- hash: b8bfeb3e2d85e7de9f577f583e4e83d00fb5c564b58716c2fdc26e0da0c6ced0  name:           nqe-version:        0.6.2+version:        0.6.3 synopsis:       Concurrency library in the style of Erlang/OTP-description:    Minimalistic actor library inspired by Erlang/OTP with support for supervisor hierarchies and asynchronous messages, as well as abstractions for synchronous communication and easy management of TCP connections.+description:    Please see the README on GitHub at <https://github.com/jprupp/nqe#readme> category:       Control homepage:       https://github.com/xenog/nqe#readme bug-reports:    https://github.com/xenog/nqe/issues
src/Control/Concurrent/NQE/Publisher.hs view
@@ -26,6 +26,8 @@     , withPublisher     , publisher     , publisherProcess+    , publish+    , publishSTM     ) where  import           Control.Concurrent.NQE.Process@@ -56,6 +58,12 @@  -- | Alias for a publisher process. type Publisher msg = Process (PublisherMessage msg)++publish :: MonadIO m => msg -> Publisher msg -> m ()+publish = send . Event++publishSTM :: msg -> Publisher msg -> STM ()+publishSTM = sendSTM . Event  -- | Create a mailbox, subscribe it to a publisher and pass it to the supplied -- function . End subscription when function returns.