[Issue 5821] New: Calling spawn in std.concurrency without all the	parameters required by void function(T) fn
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Fri Apr  8 13:37:32 PDT 2011
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=5821
           Summary: Calling spawn in std.concurrency without all the
                    parameters required by void function(T) fn
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: jsancio at gmail.com
--- Comment #0 from Jose Garcia <jsancio at gmail.com> 2011-04-08 13:33:50 PDT ---
I am not sure if this a language, compiler, or library issue but when you call
spawn without passing all the parameters required by the fn it can either
segfault if you are lucky or worst yet have an unpredictable behavior.
For example the following code will compile and execute:
import std.concurrency;
void main()
{
   spawn(&fun);
}
void fun(int i) {}
My intuition is that the code above should not compile.
-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
    
    
More information about the Digitalmars-d-bugs
mailing list