Hoogle Search
Within LTS Haskell 24.52 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
module Control.Distributed.Process.Extras.
Call This module provides a facility for Remote Procedure Call (rpc) style interactions with Cloud Haskell processes. Clients make synchronous calls to a running process (i.e., server) using the callAt, callTimeout and multicall functions. Processes acting as the server are constructed using Cloud Haskell's receive family of primitives and the callResponse family of functions in this module.
callAt :: (Serializable a, Serializable b) => ProcessId -> a -> Tag -> Process (Maybe b)distributed-process-extras Control.Distributed.Process.Extras.Call Like callTimeout, but with no timeout. Returns Nothing if the target process dies.
callForward :: Serializable a => (a -> (ProcessId, c)) -> Match cdistributed-process-extras Control.Distributed.Process.Extras.Call Produces a Match that can be used with the receiveWait family of message-receiving functions. When calllForward receives a message of type from from callTimeout (and similar), it will forward the message to another process, who will be responsible for responding to it. It is the user's responsibility to ensure that the forwarding process is linked to the destination process, so that if it fails, the sender will be notified.
callResponse :: (Serializable a, Serializable b) => (a -> Process (b, c)) -> Match cdistributed-process-extras Control.Distributed.Process.Extras.Call Produces a Match that can be used with the receiveWait family of message-receiving functions. callResponse will respond to a message of type a sent by callTimeout, and will respond with a value of type b.
-
distributed-process-extras Control.Distributed.Process.Extras.Call The message handling code is started in a separate thread. It's not automatically linked to the calling thread, so if you want it to be terminated when the message handling thread dies, you'll need to call link yourself.
-
distributed-process-extras Control.Distributed.Process.Extras.Call No documentation available.
-
distributed-process-extras Control.Distributed.Process.Extras.Call No documentation available.
-
distributed-process-extras Control.Distributed.Process.Extras.Call No documentation available.
-
distributed-process-extras Control.Distributed.Process.Extras.Call Sends a message of type a to the given process, to be handled by a corresponding callResponse... function, which will send back a message of type b. The tag is per-process unique identifier of the transaction. If the timeout expires or the target process dies, Nothing will be returned.
-
distributed-process-extras Control.Distributed.Process.Extras.Call Like callTimeout, but sends the message to multiple recipients and collects the results.