[Issue 11188] std.math.abs fails for shared BigInt type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 21 07:16:35 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=11188

--- Comment #12 from Simen Kjaeraas <simen.kjaras at gmail.com> ---
(In reply to anonymous4 from comment #11)
> I think concurrency support is unreasonable here (and lacks rationale and
> use case). How it would work? Create a mutex for every BigInt?

BigInt internals are immutable, and abs takes its argument by value, so no
mutex is necessary.

For anyone who wants to fix this, the problem is not actually in std.math.abs,
but in BigInt - its operator overloads are not shared-aware.

--


More information about the Digitalmars-d-bugs mailing list