Closed richard-ramos closed 4 months ago
qq: why
waku_destroy
is needed? We don't have such concept innwaku-libwaku
.The reason why it is necessary is because in
waku_new
we are creating a context running its own thread, yet we're not stopping that thread nor releasing the resources allocated by theContext
by callingstopWakuNodeThread
.In waku-org/nwaku#2499 I added the
waku_destroy
function which calls that function, so we can do a proper cleanup of the resources used by waku when we no longer require a node. (Think of it as a graceful shutdown)
Wonderful! Thanks for that!
Attention: Patch coverage is 15.07937%
with 107 lines
in your changes are missing coverage. Please review.
:exclamation: No coverage uploaded for pull request base (
nwaku@69a4872
). Click here to learn what that means.
Files | Patch % | Lines |
---|---|---|
examples/basic/src/main.rs | 0.00% | 107 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The reason why it is necessary is because in
waku_new
we are creating a context running its own thread, yet we're not stopping that thread nor releasing the resources allocated by theContext
by callingstopWakuNodeThread
.In https://github.com/waku-org/nwaku/pull/2499 I added the
waku_destroy
function which calls that function, so we can do a proper cleanup of the resources used by waku when we no longer require a node. (Think of it as a graceful shutdown)