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: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Jose Garcia <[email protected]> 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: -------