On 11/5/19 2:05 PM, Manu wrote:
Incidentally, in your sample above there, `a` and `b` are not
shared... why not just write: `cas(&a, null, b);` ?? If source data is
not shared, you shouldn't cast to shared.
We have the same problem in Martin's std.io library, won't build with
the null uncasted. And it's not improperly casting, because syncDriver
is stateless and immutable, so casting to shared mutable isn't going to
cause problems (I think).
https://github.com/MartinNowak/io/blob/2147802a9bca0dcf82293303f407dd3e253691e9/src/std/io/driver/package.d#L232-L250
Discussion: https://github.com/MartinNowak/io/issues/27
Currently causes pull requests for this and my iopipe library to fail to
build on CI.
P.S. glad to see shared getting some attention!
-Steve