Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Simplify the abortion mechanism with async #353

Merged
merged 6 commits into from
Jan 25, 2020

Conversation

pepeiborra
Copy link
Collaborator

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.

Off-sourcing the details of aborting computations to a mature library
Abortable is nothing but a thin wrapper for 'Async'
@ndmitchell
Copy link
Collaborator

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.

@pepeiborra
Copy link
Collaborator Author

Inlined because the abstraction was essentially Async, and all 3 combinators were async combinators

Copy link
Collaborator

@cocreature cocreature left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@cocreature cocreature merged commit f84dcf4 into haskell:master Jan 25, 2020
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.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants