-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[prelude][core] effect isolates (#853)
Please see the `Isolate` scaladoc for more background. Ideally, we should find a way to merge `Boundary` and `Isolate` but that's challenging with the inference issues we've been having and it's difficult to match the current performance of `Boundary` since it's optimized by using more low-level kernel APIs. This new mechanism is focused only on effects that maintain state but don't transform values. Main benefits of this change: - It allows users to fork computations with `Var`, `Emit`, `Memo`, and `Check`. - Users can leverage `isolate.run` directly to enforce the effect handling for a computation - Isolates provide transaction-like behavior via interaction with `Abort`. This behavior will be necessary for an STM-based effect since it'll need to rollback state to retry computations if necessary. `Isolate` can't support effects like `Choice` since it transforms `A` into `Seq[A]`.
- Loading branch information
Showing
13 changed files
with
1,662 additions
and
26 deletions.
There are no files selected for viewing
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
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
Oops, something went wrong.