feat: describe Async#866
Open
david-christiansen wants to merge 6 commits into
Open
Conversation
This PR adds a chapter about the Async monad and fixes some minor issues elsewhere.
Contributor
|
Preview for this PR is ready! 🎉 (also as a proofreading version). built with commit 22fca31. |
|
|
||
| Each of these monads has a corresponding type of asynchronous tasks that it can coordinate. | ||
| These tasks can be thought of as handles to an in-flight computation. | ||
| Calling {name}`async` on a monadic action creates a task that runs in the current thread until it suspends, and calling {name}`await` on a task results in a monadic action that waits for the task to complete. |
Member
There was a problem hiding this comment.
async can run the computation on another thread, as it uses BaseIO.asTask internally without the sync flag
|
|
||
| During selection, errors might occur at any stage of {ref "async-select"}[the protocol]. | ||
| Errors thrown by a selector during the initial {name Selector.tryFn}`tryFn` loop terminate the selection immediately. | ||
| An error thrown from a {name Selector.registerFn}`registerFn` or {name Selector.unregisterFn}`unregisterFn`, by contrast, can leave selectors that were already registered without a matching call to {name Selector.unregisterFn}`unregisterFn`. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 a chapter about the
Asyncmonad and fixes some minor issues elsewhere.