Open hassan-kamaledine opened 1 month ago
Hi @hassan-kamaledine , It's been a while since I've done pycryptoki with threading. There's nothing built into pycryptoki that is plug-and-play, but there's also nothing that makes it impossible to implement yourself, via a session pool that threads would grab from & use.
Thanks for the prompt support!
but there's also nothing that makes it impossible to implement yourself, via a session pool that threads would grab from & use.
Yep that is the plan, just wanted to check if it was ever considered to add support for this out of the box.
Have a nice day!
Hello team, I wanted to inquire about the possibility of adding support for handling sessions in a multi threaded application. An example of this can be found in the python-pcks11 library.
Since we use this library for its better compatibility with the Thales network HSM, but we faced an issue when using multiple threads with gunicorn we would get the error code CKR_OPERATION_ACTIVE since the thread tried to use a session that was already in use.