-
Notifications
You must be signed in to change notification settings - Fork 168
Description
After reading #59 I was confident that I could do it - but multithreading doesn't work for me. I've created a MS Test project that can reproduce the problem: When using a Tpm2 from multiple threads, it won't work - see https://github.com/nd1012/Demo/tree/TSS-Multithreaded/TPM
Example 1: https://github.com/nd1012/Demo/blob/c802a62c36ed1086a82e6ed9a4054fa812bab5db/TPM/TPM%20Tests/Tpm2Tests.cs#L9
Only a few HMACs will be created (usually 5-6), then all other tasks fail.
Example 2: https://github.com/nd1012/Demo/blob/c802a62c36ed1086a82e6ed9a4054fa812bab5db/TPM/TPM%20Tests/SimulatorTests.cs#L9
I guess the test would run forever, 'cause there seems to be a dead-lock somewhere?
The tests use the simulator and a real TPM2 - both fail with multithreading.
Am I doing it wrong, or is there a bug?