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

           Summary: Assertion is not work in a function called by
                    std.concurrency.spawn
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: rayerd....@gmail.com


--- Comment #0 from Haruki Shigemori <rayerd....@gmail.com> 2010-12-04 11:30:04 
PST ---
// a.d
import std.stdio, std.concurrency;
void f()
{
//    try
//    {
        writeln("1");
        assert(false);
//    }
//    catch(Throwable t)
//    {
//      writeln(t);
//      throw t;
//    }
}
void main()
{
    auto tid = spawn(&f);
    readln();
}

$ dmd a.d
1
<=== Needs assertion failure message here!

I found that assertion is not work in a function called by spawn.
You will get the following result if you remove comment keywords.

$ dmd a.d
1
core.exception.asserter...@a(7): Assertion failure

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to