cyclonedds icon indicating copy to clipboard operation
cyclonedds copied to clipboard

Why is the waitSet itself attached in this example?

Open mangodan2003 opened this issue 2 years ago • 2 comments

I've been using the below linked file as a basis for my project and am trying to better understand how the waitSet is being used.

Can somebody explain this?

https://github.com/eclipse-cyclonedds/cyclonedds/blob/master/examples/shm_throughput/shmsubscriber.c#L464

I gather one reason for doing this is to allow the application to "be woken up" from the blocking state of dds_waitset_wait() e.g. for shutdown, but this does not seem to be the case here, i.e. nowhere is dds_waitset_set_trigger() used.

mangodan2003 avatar Oct 13 '22 10:10 mangodan2003

I'd say your understanding is correct, which means I screwed up by overlooking that bit in https://github.com/eclipse-cyclonedds/cyclonedds/pull/101, and then this got propagated into shmsubscriber.c.

If you'd be willing to do a PR to remove this, that'd be great!

eboasson avatar Oct 14 '22 07:10 eboasson

Sorry for the noise! I had some dummy/incorrect signoff details on my machine that I hadn't noticed until too late and wasn't sure how to deal with. Ended up scrubbing the branch and the original PR and starting over.

mangodan2003 avatar Oct 14 '22 13:10 mangodan2003

Thanks @mangodan2003! Your relevant PR was merged. 😄

thijsmie avatar Oct 19 '22 08:10 thijsmie