This repository was archived by the owner on Sep 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Handle arbitrary STM actions #10
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nels or STM actions
…attempt to establish the monitor before evaluating the stm write action
hyperthunk
commented
Feb 21, 2017
-- first, or the stm transaction. As a result, assuming that your server process | ||
-- can die/fail/exit on evaluating the read end of the STM write we perform here | ||
-- (and we assume this is very likely, since we apply no safety rules and do not | ||
-- even worry about serialisating thunks passed from the client's thread), it is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/serialisating/serialising/
hyperthunk
commented
Feb 21, 2017
-- 'serve', and passing an initialised 'PrioritisedProcessDefinition'. | ||
-- | ||
-- Note that prioritised process definitions cannot utilise control channels, | ||
-- not can the @handleExternal@ family of expressions be used with them. This |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/not/nor/
hyperthunk
commented
Feb 21, 2017
-- of Cloud Haskell's /Process/ monad, but can also be used as a channel for | ||
-- sending and/or receiving non-serializable data to or from a managed process. | ||
-- Obviously if you attempt to do this across a remote boundary, things will go | ||
-- spectacularly wrong. The APIs provided to not attempt to restrain this, or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/to/do/
hyperthunk
commented
Feb 21, 2017
-- | ||
-- As unpleasant as this is, there's little we can do about it without making | ||
-- false assumptions about the runtime. Cloud Haskell's semantics guarantee us | ||
-- only that we will see /some/ monitor signal in the even of a failure here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/even/event/
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for performing arbitrary STM actions that yield an input, then running a standard handler against them. The STM actions are handled as per
matchSTM
in the underlying distributed-process library, such that they are composed with all the other matchers (e.g., typed channel / port reading, and general mailbox handling of Call/Cast messages).Note: Incomplete PR.