Copyright | (c) Tim Watson 2017 |
---|---|
License | BSD3 (see the file LICENSE) |
Maintainer | Tim Watson <watson.timothy@gmail.com> |
Stability | experimental |
Portability | non-portable (requires concurrency) |
Safe Haskell | None |
Language | Haskell98 |
The Client Portion of the FSM API.
- call :: (Serializable m, Serializable r) => ProcessId -> m -> Process r
- callTimeout :: (Serializable m, Serializable r) => ProcessId -> m -> TimeInterval -> Process (Maybe r)
- safeCall :: (Serializable m, Serializable r) => ProcessId -> m -> Process (Either ExitReason r)
Documentation
call :: (Serializable m, Serializable r) => ProcessId -> m -> Process r Source #
callTimeout :: (Serializable m, Serializable r) => ProcessId -> m -> TimeInterval -> Process (Maybe r) Source #
As call
but times out if the response does not arrive without the
specified TimeInterval. If the call times out, the caller's mailbox
is not affected (i.e. no message will arrive at a later time).
safeCall :: (Serializable m, Serializable r) => ProcessId -> m -> Process (Either ExitReason r) Source #
Initiate a call
and if an exit signal arrives, return it as
Left reason
, otherwise evaluate to Right result
.