Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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