Skip to content

Document or explain thread safety of C bindings #11

@numinit

Description

@numinit

Hey @roberth

I'm experimenting with the C bindings in Rust, and am running into things like this when passing off a value between threads:

error[E0277]: `NonNull<nix_c_raw::value>` cannot be sent between threads safely
   --> src/main.rs:134:5

I've seen this with a couple other types, too. It would help to know what I have to do to get these working between threads, or whether doing so is a good idea. (From what I've seen, you may just have to register the Boehm GC onto the current thread, and squash these errors by adding Send, but I'm also not sure?)

(P.S. I know that the Rust bindings aren't "public" yet, but already got a flake evaluating with them, thanks for the work!)

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