Skip to content

Why the port must be dropped when the context is dropped? #48

Open
@sgkim126

Description

@sgkim126

Arc::try_unwrap(self.port.take().unwrap()).unwrap().shutdown();

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions