Summary: std.concurrency does not allow to pass Tid in struct
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from 2010-09-29 12:14:23 PDT ---
send() allows to Tid only as a top-level parameter. Using Tid in a struct does
not work. This compiles:
import std.concurrency;
void main() {
    send( thisTid, thisTid );
    receive( Tid );

This fails to compile:
import std.concurrency;
struct Message { Tid tid; }
void main() {
    send( thisTid, Message( thisTid ) );
    receive( ( Message ) {} );
std/concurrency.d(363): Error: static assert  "Aliases to mutable thread-local
data not allowed."
c.d(4):        instantiated from here: send!(Message)

So Tid is not mutable when passed to send() directly, but as a part of struct
Message, it suddenly becomes mutable?

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to