Moved the expensive part of token termination onto a worker thread.
The effect is that the OnLogout event is quick and consistent. There is
no noticeable difference (at the ms level) between this OnLogout
implementation and not doing anything in the OnLogout handler. File
system handles are still closed synchronously so a race condition does
not exist with ui.conf killing processes with open handles.
TEST=Ran all unit tests.
Ran platform_Pkcs11Init* autotests.
Tested timing by manually unloading with active keys.
Manually verified that chapsd does not get killed on logout.
2 files changed