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

Add query and reply channels #400

Conversation

sashacmc
Copy link
Member

@sashacmc sashacmc commented Apr 9, 2024

Add query and reply channels:

  • z_owned_query_ring_channel_t
  • z_owned_query_fifo_channel_t
  • z_owned_reply_ring_channel_t
  • z_owned_reply_fifo_channel_t

Add examples:

  • z_queryable_channel.c
  • z_get_channel.c

@sashacmc sashacmc force-pushed the add_query_reply_channels branch from 7c4826d to c23333d Compare April 10, 2024 21:56
@sashacmc sashacmc marked this pull request as ready for review April 10, 2024 21:58
@sashacmc sashacmc mentioned this pull request Apr 11, 2024
6 tasks
}

z_owned_reply_t reply = z_reply_null();
z_call(channel.recv, &reply);
Copy link
Member

Choose a reason for hiding this comment

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

I think we should use for(z_call(..), z_check(..), z_call(..)). The current code only reads one reply but it does not wait for all the replies to arrive.

@Mallets
Copy link
Member

Mallets commented Apr 11, 2024

@jean-roland this PR looks good to me. However the CI seems to fail. I believe the failure is not related to the changes proposed in this PR but I'm not 100% sure. Could you please double check?

@jean-roland
Copy link
Contributor

There are issues that are fixed by #399 but there also seems to be issues related to this PR when some features are disabled.

@sashacmc
Copy link
Member Author

Thanks @jean-roland, I will take a look

@sashacmc sashacmc force-pushed the add_query_reply_channels branch from fc35ea5 to 41f728d Compare April 11, 2024 14:06
@sashacmc sashacmc force-pushed the add_query_reply_channels branch from 41f728d to a6e1278 Compare April 11, 2024 14:07
@sashacmc
Copy link
Member Author

I fixed the compilation with disabled features and the memory leak (thanks @jean-roland for pointing out)
@Mallets you can merge it.

@Mallets Mallets merged commit 4893219 into eclipse-zenoh:protocol_changes Apr 11, 2024
50 checks passed
@Mallets Mallets deleted the add_query_reply_channels branch April 11, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants