Update the MULTIPROCESS static when changing default options

This commit is contained in:
Fabrice Desré 2018-03-15 16:23:40 -07:00
parent 5f40842294
commit e268a4341c

View file

@ -911,6 +911,9 @@ lazy_static! {
} }
pub fn set_defaults(opts: Opts) { pub fn set_defaults(opts: Opts) {
// Set the static to the new default value.
MULTIPROCESS.store(opts.multiprocess, Ordering::SeqCst);
unsafe { unsafe {
assert!(DEFAULT_OPTIONS.is_null()); assert!(DEFAULT_OPTIONS.is_null());
assert_ne!(DEFAULT_OPTIONS, INVALID_OPTIONS); assert_ne!(DEFAULT_OPTIONS, INVALID_OPTIONS);