Skip to content
This repository has been 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

Open
mzabaluev opened this issue Jan 10, 2015 · 0 comments
Open

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

mzabaluev opened this issue Jan 10, 2015 · 0 comments

Comments

@mzabaluev
Copy link
Member

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant