Whether or not to dup the original associative array, or to inherit it by reference. Default is Yes.dup.
Original associative array.
auto orig = [ 1 : "one", 2 : "two", 3 : "three" ]; auto aa = mutexedAA(orig); // no need to setup assert(1 in aa);
{
auto orig = [ 1 : "one", 2 : "two", 3 : "three" ];
auto aa = mutexedAA(orig);
aa[4] = "four";
assert(aa.has(4));
assert(4 !in orig);
}
{
auto orig = [ 1 : "one", 2 : "two", 3 : "three" ];
auto aa = mutexedAA!(No.dup)(orig);
aa[4] = "four";
assert(aa.has(4));
assert(4 in orig);
}
Convenience function to create and setup a MutexedAA instance. Overload that inherits an original associative array, or optionally duplicates it. Infers the types to instantiate the MutexedAA with from the AA passed.
Note: The original associative array must be mutable.