Skip to content

Forbid in-place conversions of global objects. #117

@stevelinton

Description

@stevelinton

After doing some work on cleaning up the library around ConvertToVectorRep and CopyToVectorRep,
I am experimenting with having the kernel check for, and ban, in-place conversion of lists and matrices in the global/atomic region (region zero). This is basically immutable lists and matrices.

This is easy to do, but currently breaks quite a few tests. Mostly these are easy to fix and I'm working through them. If I can make this work it might be worth doing the same for string conversion, blist conversion, etc.

The nice thing is it then legal to make a new mutable (and so thread-local) vector, convert it and then optionally make it immutable, which can never cause a race condition, but illegal to convert an object that could in principle be accessible by another thread.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions