Does anyone understand how to use "shared" types with concurrency send/receive functions?

Arek via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Aug 14 12:11:53 PDT 2017


On Monday, 14 August 2017 at 03:40:26 UTC, Jonathan M Davis wrote:
> On Saturday, August 12, 2017 18:57:44 Arek via 
> Digitalmars-d-learn wrote:
>> I have the folowing problem:
>> I like to envelope the class object in struct to control the
>> destruction moment and then send this object to another
>> thread/fiber (or task, cause I use vibe-d).
>>
>> I can't find any method to make it working. Any ideas?
>
> Unfortunately, send and receive do not currently work with 
> shared because of issues with Variant, which they use 
> internally.
>
> - Jonathan M Davis

That's what I suspected. Thanks for the confirmation. I was not 
sure if I was doing everything right.

Arek


More information about the Digitalmars-d-learn mailing list