-
Enhancement
-
Resolution: Fixed
-
P3
-
None
-
repo-panama
In the current memory segment API, there are some regular wither methods (withAccessModes, asSlice) which simply return a new memory segment, with different properties.
Then we also have methods like withCleanupAction, withOwnerThread, registerCleaner which looks like wither methods, but in reality they side effect the current segment, by rendering it invalid.
This is, often a source of confusion for clients. The fact that handing off a segment is a terminal operation should be more explicit in the API.
Then we also have methods like withCleanupAction, withOwnerThread, registerCleaner which looks like wither methods, but in reality they side effect the current segment, by rendering it invalid.
This is, often a source of confusion for clients. The fact that handing off a segment is a terminal operation should be more explicit in the API.