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

support internal/unstable close builder API #835

Merged
merged 8 commits into from
Dec 4, 2024

Conversation

yellowhatter
Copy link
Contributor

@yellowhatter yellowhatter commented Nov 26, 2024

[closes #832 ]
This is temporary API, it's going to be replaced when eclipse-zenoh/zenoh#1626 is implemented

@yellowhatter yellowhatter added enhancement New feature or request api sync Synchronize API with other bindings labels Nov 26, 2024
@yellowhatter yellowhatter self-assigned this Nov 26, 2024
Copy link
Contributor

@milyin milyin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, but the separation between core and zenoh-c specific API should be implemented for structure fields

/**
* The timeout for close operation in milliseconds. 0 means default close timeout which is 10 seconds.
*/
uint32_t timeout_ms;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering how to separate fields of options structures to "core" api and "zenoh-c" (or zenoh-pico) specific API.
It seems that if the structure contains zenoh-c specific fields, it should be zc_close_options_t itself.
This means that we have to add also the function zc_close which takes zc_close_options_t instead of common z_close_options_t.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, z_close is not zenoh-c specific API, as well as option's fields like timeout and out_concurrent - they are present in Rust with some language-specific difference.

Otherwise following your logic, we should zc_* everything that has options API.....

Conflicts:
	Cargo.lock
	build-resources/opaque-types/Cargo.lock
	build-resources/opaque-types/Cargo.toml
	include/zenoh_macros.h
- close API is unstable and internal
@milyin milyin changed the title support close builder API support internal/unstable close builder API Dec 4, 2024
@yellowhatter yellowhatter added the release Part of the next release label Dec 4, 2024
@yellowhatter yellowhatter enabled auto-merge (squash) December 4, 2024 11:55
@yellowhatter yellowhatter merged commit 8f867fc into eclipse-zenoh:main Dec 4, 2024
19 checks passed
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 enhancement New feature or request release Part of the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Close builder support
2 participants