std.concurrency and const

frame frame86 at live.com
Thu Jan 6 01:55:05 UTC 2022


On Wednesday, 5 January 2022 at 22:22:19 UTC, Christian Köstlin 
wrote:
> Hi all,
>
> I really like std.concurrency but I now stumbled upon the 
> following.
> When receiving messages as const, they also need to be sent as 
> const (otherwise they are not matched). Comparing this to 
> normal function calls I would expect a different behavior.

They do. You have an error:

`Message` doesn't match with `(Tid sender, const(Message) m)`. 
You don't get the argument `sender` here.


More information about the Digitalmars-d-learn mailing list