does the shared keyword work with mutable structs?
WhatMeWorry
kheaser at gmail.com
Fri Mar 9 19:33:26 UTC 2018
On Friday, 9 March 2018 at 10:42:47 UTC, Kagamin wrote:
> To make a struct noncopyable, add @disable this(this); to it,
> then compiler will give an error on an attempt to copy it.
I tried the @disable this(this); but now it doesn't even compile?
Error: template std.concurrency.spawn cannot deduce function from
argument types !()(void function(shared(EventBuffer) eB,
shared(Lock) lock), shared(EventBuffer), shared(Lock)),
candidates are:
C:\ldc2\bin\..\import\std\concurrency.d(464):
std.concurrency.spawn(F, T...)(F fn, T args) if (isSpawnable!(F,
T))
Is std.concurrency a work in progress or I'm I just obtuse here?
I've been reading Ali's book on the concurrency chapters as
inspiration, but the examples there use simple data types like
ints or bools.
More information about the Digitalmars-d-learn
mailing list