Skip to content

Interpreter<H> isn't safely Send or Sync because of dyn RegionHandler #301

Description

@martin-hughes

The lines

unsafe impl<H> Send for Interpreter<H> where H: Handler + Send {}
unsafe impl<H> Sync for Interpreter<H> where H: Handler + Send {}

aren't true because dyn RegionHandler might not be Send/Sync.

I can see that facs is safe to declare Send or Sync because only the global_lock field is actually used.

I'm sure there's some generic-types magic to resolve this. Alternatively it might be desirable to constrain the RegionHandlers to be Send + Sync, but that'd technically be a breaking API change.

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