Skip to content
This repository was archived by the owner on Nov 26, 2020. It is now read-only.

A sendable reference type for objects not parked in a thread #21

@mzabaluev

Description

@mzabaluev

There are cases when an object can be sent to another thread as long as no other references to it exist in safe code.
Add a sendable reference type NewRef with the following features:

  • Derefs to the object
  • Implements Send
  • Does not implement Clone
  • A method or function, tentatively named park(), promotes a NewRef into Ref, effectively parking the object in the calling thread.

See some rationale in a comment on the GObject-introspection bug regarding thread-safety annotations.

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