This repository has been archived by the owner on Jan 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
Simplify the abortion mechanism with async #353
Merged
Merged
Conversation
This file contains 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
Off-sourcing the details of aborting computations to a mature library
Abortable is nothing but a thin wrapper for 'Async'
Why inline it? Having the abstraction separated seems valuable - and there are a few more things we could hopefully abstract the logic vs control flow. |
Inlined because the abstraction was essentially Async, and all 3 combinators were async combinators |
cocreature
reviewed
Jan 25, 2020
cocreature
reviewed
Jan 25, 2020
cocreature
approved these changes
Jan 25, 2020
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.
Thanks a lot!
pepeiborra
added a commit
to pepeiborra/ghcide
that referenced
this pull request
Feb 1, 2020
* Extract a minimal Abortable abstraction from shakeRun * Add an Abortable implementation with Async * Switch to async implementation Off-sourcing the details of aborting computations to a mature library * Inline the async implementation Abortable is nothing but a thin wrapper for 'Async' * Call logDebug out of the withMVar lock * Simplify withMVar'
pepeiborra
added a commit
to pepeiborra/ide
that referenced
this pull request
Dec 29, 2020
* Extract a minimal Abortable abstraction from shakeRun * Add an Abortable implementation with Async * Switch to async implementation Off-sourcing the details of aborting computations to a mature library * Inline the async implementation Abortable is nothing but a thin wrapper for 'Async' * Call logDebug out of the withMVar lock * Simplify withMVar'
pepeiborra
added a commit
to pepeiborra/ide
that referenced
this pull request
Dec 29, 2020
* Extract a minimal Abortable abstraction from shakeRun * Add an Abortable implementation with Async * Switch to async implementation Off-sourcing the details of aborting computations to a mature library * Inline the async implementation Abortable is nothing but a thin wrapper for 'Async' * Call logDebug out of the withMVar lock * Simplify withMVar'
pepeiborra
added a commit
to pepeiborra/ide
that referenced
this pull request
Dec 29, 2020
* Extract a minimal Abortable abstraction from shakeRun * Add an Abortable implementation with Async * Switch to async implementation Off-sourcing the details of aborting computations to a mature library * Inline the async implementation Abortable is nothing but a thin wrapper for 'Async' * Call logDebug out of the withMVar lock * Simplify withMVar'
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.
Proposed fix for #326
The commit history contains a breakdown of the problem. First I extracted a control flow abstraction, then simplified it using async, and finally inlined it.
Unfortunately the only thing missing is evidence that this change completely fixes the issue, but hopefully outsourcing the tricky bits to 'async' is a step in the right direction.