What is the proper way to shutdown a session? #160
Unanswered
mangodan2003
asked this question in
Q&A
Replies: 1 comment
-
The difference between the zenoh examples and your code is the keyword |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using only pub so far.
The basic examples all (zenoh-c and zenonh-cpp) seem to shutdown cleanly but as soon as I try to integrate into a real application I am hitting rust panics or just hangs at exit.
I am using zenoh-c and zenoh-cpp 1.0.0.5
This is the simplest example that reproduces the panic - note, holding the session within a class which is destructed causes the panic. I have tried using pure zenoh-c and calling z_close in the class destructor but thus doesn't help. In fact not calling z_close stops the panic and in a simple example makes everything appear good, but in our real world app something hangs and prevents the app from exiting.
Build with:
g++ -o test test.cpp -I zenoh-cpp/include/ -I zenoh-c/include/ -DZENOHCXX_ZENOHC -lzenohc -L zenoh-c/target/release
Run with:
LD_LIBRARY_PATH=zenoh-c/target/release ./test
The output of which is:
thread '<unnamed>' panicked at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/thread/local.rs:262:26: cannot access a Thread Local Storage value during or after destruction: AccessError note: run with
RUST_BACKTRACE=1environment variable to display a backtrace Aborted (core dumped)
Many thanks!
Beta Was this translation helpful? Give feedback.
All reactions