[Issue 13930] std.concurrency can't send immutable AA to another thread
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 8 15:15:35 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=13930
Tomoya Tanjo <ttanjo at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ttanjo at gmail.com
--- Comment #3 from Tomoya Tanjo <ttanjo at gmail.com> ---
I guess this issue contains two distinct problems.
The example in the first comment is about the problem of the `send` function.
I guess it was already solved by issue 21296 because the following test works
without errors (I used phobos commit:f85ca8db in which issue 21296 was fixed):
```
@system unittest
{
immutable aa = ["0":0];
thisTid.send(aa);
}
```
The example in the second comment is about the problem of the `receiveOnly`
function (same as issue 19345).
This problem only happens with `receiveOnly` but does not happen with other
`receive` family such as `receive` and `receiveTimeout`.
I confirmed the following tests work without errors (I used phobos
commit:f85ca8db):
```
@system unittest
{
immutable aa = ["0":0];
thisTid.send(aa);
receive((immutable int[string] val) {});
}
@system unittest
{
immutable aa = ["0":0];
thisTid.send(aa);
receiveTimeout(10.seconds, (immutable int[string] val) {});
}
```
Note: I did not test the case of shared.
--
More information about the Digitalmars-d-bugs
mailing list