CodeChain-io / CodeChain-io/remote-trait-object
Why the port must be dropped when the context is dropped?
- Dominant language
- Rust
- Stars
- 13
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/CodeChain-io/remote-trait-object/blob/7ac07c741059ae583a05143a62cd6b07898e1c0b/remote-trait-object/src/context.rs#L63
Currently, it fails to drop the context when the port is still held by others. But, there is no way to guarantee whether all other holders released before the context dropped.
How about dropping context calls shutdown and making the methods of the `Port` returns a `Result`?
It also should make the shutdown of the `Port` takes the mutable reference of the self. It means the user can access the port after shutdown, but I think this would be safer.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.