Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yes, it is possible for multiple Ruby threads to use the same instance of OpenSSL::PKey::RSA object. However, care must be taken to ensure that the object is accessed in a thread-safe manner to prevent any race conditions or shared state issues. It is recommended to use locks or mutexes to synchronize access to the object between threads. Another approach could be to create a pool of initialized objects that can be shared by multiple threads.