When using vibe.d 0.8.0 with ldc2 1.3.0-beta2 on windows, trying to send
or sendCompat
anything to a task created before the sender, causes a range violation. This does not happen with dmd.
CoreTaskFiber was terminated unexpectedly: Range violation
This program will reproduce the error. Swapping the runTask
lines will produce the expected hello
output.
import std.stdio;
import core.time;
import vibe.core.core;
import vibe.core.concurrency;
Task alice;
Task bob;
int main () {
bob = runTask(() { bobProc(); });
alice = runTask(() { aliceProc(); });
setTimer(1.seconds, () { exitEventLoop(); });
return runEventLoop();
}
void aliceProc () {
send(bob, "hello");
}
void bobProc () {
receive(
(string s) { writeln(s); }
);
}