sending the address of a struct
Simen Kjærås
simen.kjaras at gmail.com
Sun Sep 6 11:10:14 UTC 2020
On Sunday, 6 September 2020 at 09:58:54 UTC, Johann Lermer wrote:
> pointer. The error message says:
>
> std.concurrency.MessageMismatch at std/concurrency.d(237):
> Unexpected message type: expected 'shared(Env*)', got
> 'shared(test.Env)*'
The error message gives you all the information you need - notice
the position of the asterisk inside the parens on one, outside on
the other? The pointer itself is not shared, only the pointee -
the data pointed to. This works:
auto e = receiveOnly!(shared(Env)*);
--
Simen
More information about the Digitalmars-d-learn
mailing list