using shared effectively in a producer/consumer situation.

Stanislav Blinov via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Apr 23 13:46:12 PDT 2017


On Sunday, 23 April 2017 at 20:33:48 UTC, Kevin Balbas wrote:

> I guess the follow up here is:  Is this the correct way to do 
> it?
>  cast to shared, send to main thread, cast away shared?

At the moment, pretty much yes. Either that or make the 
(unnecessary) immutable copies.
There are no ownership primitives in Phobos yet, and shared 
itself is still... not quite there.


More information about the Digitalmars-d-learn mailing list