Summary: Implicit sharing via delegates in std.concurrency
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from David Simcha <> 2010-09-06 19:26:07 PDT ---
The following code compiles and should not, because it allows implicit sharing
of data between threads in the supposedly safe std.concurrency:

import std.concurrency;

void runDelegate(void delegate() dg) {

class Foo {
    uint num;

    void incNum() {

void main() {
    auto foo = new Foo;
    spawn(&runDelegate, &foo.incNum);

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

Reply via email to