Skip to content

finalize() without drop()? #150

Open
@arjennienhuis

Description

@arjennienhuis

The only way I can find to "gracefully" stop another thread that is blocking on C_WaitForSlotEvent is to call C_Finalize.

Pkcs11::finalize() is a no-op and Pkcs11Impl::finalize() is only called on drop(). I cannot drop the library if it is being used in another thread.

Is it ok to let Pkcs11::finalize() call Pkcs11Impl::finalize()?

We also need to fix Pkcs11::is_initialized() but that is a separate issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions