On Tuesday, 4 August 2015 at 11:42:54 UTC, Dicebot wrote:
On Tuesday, 4 August 2015 at 11:33:11 UTC, 岩倉 澪 wrote:
On Tuesday, 4 August 2015 at 10:37:39 UTC, Dicebot wrote:
std.concurrency does by-value message passing (in this case just ptr+length), it never deep copies automatically

I assumed that it would deep copy (in the case of mutable data) since the data being sent is thread-local (unless I am misunderstanding something)

It is heap-allocated and in there is no thread-local heap currently in D - only globals and static variables.

std.concurrency never deep copies - if you are trying to send data which contains indirections (pointers/arrays) _and_ is not marked either immutable or shared, it will simply not compile.

Ahh, thanks for the clarification! That makes a lot of sense

Reply via email to