eclipse-zenoh / zenoh-c

C API for Zenoh
http://zenoh.io
Other
80 stars 57 forks source link

make writer/reader types owned #723

Closed milyin closed 1 month ago

milyin commented 1 month ago

Describe the release item

The types z_bytes_writer_t, z_bytes_reader_t are copyable according to their names. But they wraps Rust types ZBytesWriter/ZBytesReader which are not copyable. The behavior of parallel reading/writing to multiple readers/writers is not defined. There should be one and only one reader or writer for z_owned_bytes_t at any moment. So we have to:

milyin commented 1 month ago

After discussion with @DenisBiryukov91 the following plan was proposed:

This proposal is similar to this attempt to fix the same issue in https://github.com/eclipse-zenoh/zenoh-c/pull/675