Skip to content

Is it possible to make VirtualMachine Sync? #2718

@allsey87

Description

@allsey87

I am trying to integrate RustPython into a game using Bevy and although I am able to find a solution using exclusive systems it is not very flexible and prevents other unrelated systems from running in parallel.

The core issue is that Sync is not currently implemented for VirtualMachine, or more precisely for the RefCell wrapping std::vec::Vec<PyRef<rustpython_vm::frame::Frame>>.

Is it possible to use a Mutex internally instead of a RefCell? Or if this is not desirable, perhaps just when RustPython's threading feature is enabled?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions