I'd submitted https://issues.dlang.org/show_bug.cgi?id=4130 which is related to issues with shared values assignment.

Consider:

struct S { long a, b, c; ... }

Should it be safe to assign one S to another? I guess not because assignment would violate whatever invariant a, b, and c may hold, and there's too much state to be assigned atomically. Somewhat sadly, this code does compile:

shared S s1, s2;
s1 = s2;

However, assigning Variant objects holding such structs does not compile, which in turn leads to the reported bug in std.concurrency. Now it seems to me that the only way is to adapt Variant to allow such assignments, otherwise we'd be breaking existing code. Thoughts appreciated.


Andrei

Reply via email to