std.concurrency and const
Christian Köstlin
christian.koestlin at gmail.com
Thu Jan 6 10:34:27 UTC 2022
On 2022-01-06 02:55, frame wrote:
> 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.
Duh ... you are right, my mistake!!!
Thanks!
Christian
More information about the Digitalmars-d-learn
mailing list