Unsafe, unchecked message-passing with std.concurrency

Simen Kjærås simen.kjaras at gmail.com
Thu Aug 27 08:46:31 UTC 2020

On Thursday, 27 August 2020 at 08:39:49 UTC, Elronnd wrote:
> Is there any way to do unsafe, unchecked message-passing using 
> std.concurrency's API?  I want to be able to share mutable data 
> without having to qualify it as shared.  It looks like the 
> check happens in send(), before passing off data to _send(), 
> which does no checking; but _send is private.  Is there any 
> analogous functionality elsewhere in phobos--send_unchecked or 
> similar?

Since you're fine with unsafe, unchecked - why not just lie to 
the compiler? Cast the data to shared and send it on its merry 


More information about the Digitalmars-d mailing list