http://d.puremagic.com/issues/show_bug.cgi?id=8608
Summary: CTFE seems to be invoked
implicitly(std.parallelism.task)
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Eyy�b Sari <[email protected]> 2012-09-02
11:36:58 PDT ---
Hi,
<code>
import std.stdio;
import std.datetime;
import std.parallelism;
void doFor(File file)
{
static uint n;
++n;
file.writeln("Task n�", n, " begin: ", Clock.currAppTick);
for(uint i = 0; i < 100; ++i)
{}
file.writeln("Task n�", n, " end : ", Clock.currAppTick);
}
void main()
{
writeln("begin");
auto file = File("task.txt", "w");
for(uint i = 0; i < 10; ++i)
{
auto test = task!(doFor(file));
test.executeInNewThread();
}
file.close();
writeln("end");
}
</code>
That code produces this error :
>Assertion failed: (v2->hasValue()), function interpret, file interpret.c, line
>677.
>Abort trap: 6
And, with dustmite, the result is :
<code>
import std.stdio;
import std.parallelism;
void doFor(File )
{
}
void main()
{
auto file = File;
test = task!(doFor(file));
}
</code>
So, why is CTFE invoked here ?
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------