On Sunday, 6 September 2020 at 09:58:54 UTC, Johann Lermer wrote:
pointer. The error message says:

std.concurrency.MessageMismatch@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

Reply via email to