Forum: JRuby ThreadContext.secureRandom

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Caa2df9372ffa0a9e95b2bab1e8fea34?d=identicon&s=25 Karol Bucek (Guest)
on 2014-03-25 23:06
(Received via mailing list)
I was wondering, are ThreadContext objects getting reused ?

Even if they are, assuming I have several hundreds of Threads, with
JRuby
there will be a secureRandom final field created with every thread
context
instance,
https://github.com/jruby/jruby/blob/1.7.11/core/sr...
?

I would like to know if this is an optimization done solely due
https://github.com/jruby/jruby/blob/1.7.11/core/sr......
looking into security providers lately, using methods that consult all
installed providers (>= 9 by default) when "not needed" seems like best
to
be avoided (unless necessary).

I'd be happy to look into possibly refactoring this one, just wanted to
check if there's another reason,
as this also might have a relation to some of the 'BC' internal
refactoring
to be finished up for OpenSSL.

Thanks, K.
This topic is locked and can not be replied to.