-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allowing session declarations to stay alive for the lifespan of a ses…
…sion. (#96) * feat(background declarations): Allowing session declarations to stay alive for the lifespan of a session. Zenoh declarations ran for as long as the Kotlin variable representing them was kept alive. This meant that whenever the user lost track of the variable, it got garbage collected and undeclared in the process. This behavior seems to be counterintuitive for programmers used to garbage collected languages (see #43). Therefore in this PR we provide the following change: we keep track of session declarations in a list inside the session, allowing users to keep running them despite losing their references. When the session is finalized, the associated declarations are undeclared. In case the user needs to close a declaration earlier, they need to keep the variable in order to undeclare it. * feat(background declarations): closing all session declarations immediately after doing `session.close()`
- Loading branch information
Showing
8 changed files
with
63 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters