This repository has been archived by the owner on Feb 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Make memoization compatible with MPP #331
Merged
Merged
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
88d066d
Replace ConcurrentHashMap impl by atomic to be able to work in MPP
aballano 9e298c4
nit
aballano b94636f
nit comments
aballano c3d6983
format
aballano 1e89956
Merge branch 'master' into ab/make-memoization-mpp
raulraja 0dbc714
Add racing test
aballano c63e459
Merge branch 'ab/make-memoization-mpp' of github.com:arrow-kt/arrow-c…
aballano 27695ed
Merge branch 'master' into ab/make-memoization-mpp
aballano c2195a0
nit format
aballano 6fd9233
Merge branch 'ab/make-memoization-mpp' of github.com:arrow-kt/arrow-c…
aballano 1d6cd96
Merge branch 'master' into ab/make-memoization-mpp
aballano f07424b
Forgot to close ank block
aballano 30dd62f
Merge branch 'ab/make-memoization-mpp' of github.com:arrow-kt/arrow-c…
aballano cfa708c
Merge branch 'master' into ab/make-memoization-mpp
aballano d0ecd2b
Merge branch 'master' into ab/make-memoization-mpp
aballano a6a5915
Merge branch 'master' into ab/make-memoization-mpp
i-walker File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
18 changes: 0 additions & 18 deletions
18
arrow-syntax/src/main/kotlin/arrow/syntax/internal/Platform.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Does it make sense to define them as suspended functions. Given the nature of memoizing, or am I mistaken here?
cc @nomisRev
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.
This PR just updates the existing code to remove the dependency on Java classes. We can do a variant of this for suspending code as well.
Kinda silly that this needs to be defined separately tho, since normal code should work for suspending code. Only the other way around is not true.
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.
Actually, the
suspend
version is the only pure/referential transparent implementation since it involves allocation mutable shared state to do the memoisation.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.
Yes, that was one of my concerns.
Maybe it's worth deprecating it first and rolling out a suspended version either here or in
Arrow Fx