Ensure global inits in Random are static-safe
Summary: [Folly] Ensure global inits in Random are static-safe by using the machinery of `static` local variables. The default mutex type used with `once_flag` is `SharedMutex`, but that mutex type is not trivially-destructible. An alternative mutex type might be trivially-destructible, such as `MicroLock`, so an alternative solution could be to use `once_flag` with `MicroLock`. Reviewed By: ot, luciang Differential Revision: D19207285 fbshipit-source-id: a7d817cf8521337543e3e27bc0e0e61241714ced
Showing
Please register or sign in to comment