http://d.puremagic.com/issues/show_bug.cgi?id=4957

           Summary: std.concurrency does not allow to pass Tid in struct
                    fields
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: osa8...@gmail.com


--- Comment #0 from osa8...@gmail.com 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to