[Insight-users] Mersenne Twister not thread safe and not documented as such

Neil Weisenfeld weisen at crl.med.harvard.edu
Wed Aug 5 11:53:48 EDT 2009


Hi all,

Due to bug # 4846 discussed here:

http://www.itk.org/pipermail/insight-users/2007-April/021842.html

the Mersenne Twister is not thread safe.  A side effect is that the
random iterators are not thread safe.

Luis's suggestion to convert the MT back to a normal Object seems the
most sensible, however since this hasn't happened, maybe it would be
easier to add mutex locks around the few Get*Variate*() calls
affected?  Or can we at least add it to the documentation that these
are not thread safe?

What do people think?


Thanks,
Neil


More information about the Insight-users mailing list