Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistent synchronization api #368

Closed
DenisBiryukov91 opened this issue Mar 6, 2024 · 1 comment
Closed

inconsistent synchronization api #368

DenisBiryukov91 opened this issue Mar 6, 2024 · 1 comment
Labels
api sync Synchronize API with other bindings

Comments

@DenisBiryukov91
Copy link
Contributor

DenisBiryukov91 commented Mar 6, 2024

Describe the release item

There are several inconsistencies with synchronization api (z_task..., z_convar..., z_mutex...).

  • All of the types they operate upon are technically non-copyable; i.e. they can only be aliased or moved - should we enforce it more clearly using owned_ semantics ?
  • z(p)_task_free accepts **z_task_t; is double-pointer really necessary here, given that other _free functions accept a simple pointer, there is no enforcement to allocate z_task_t on heap, and other z(p)_task... functions accept a simple pointer
  • the behavior of z(p)_task_free does not seem to be consistent across platforms: in most cases z_task_t pointer is just freed - which likely corresponds to the thread detach if it was not join before, while in freertos and flipper - some related system resources are freed.
  • Is z_task_free really needed at all, given that we can simply put all related logic in z(p)_task_join or zp_task_cancel ?
@DenisBiryukov91 DenisBiryukov91 added the release Part of the next release label Mar 6, 2024
@milyin milyin moved this to Backlog in Zenoh 1.0.0 release Mar 12, 2024
@milyin milyin added api sync Synchronize API with other bindings and removed release Part of the next release labels Mar 12, 2024
@DenisBiryukov91
Copy link
Contributor Author

resolved by #484 and #489.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api sync Synchronize API with other bindings
Projects
Status: Done
Development

No branches or pull requests

2 participants