On Monday, 15 August 2016 at 01:53:33 UTC, Charles Hixson wrote:
If I modify the code to attempt to pass a Tid[] as a member of struct Start I get:

/usr/include/dmd/phobos/std/concurrency.d(603): Error: static assert "Aliases to mutable thread-local data not allowed."
test.d(47):        instantiated from here: send!(Start)

and this seems to imply that the casting away of shared might also be an unsafe access which just doesn't happen to be detected by the library.

Currently not all types, that are supposed to be thread-safe, support shared, e.g. Semaphore, so it doesn't necessarily mean that sharing them is incorrect.

Reply via email to