Am 03.10.2016 um 23:59 schrieb Jack Applegame:

Shorter test case (Issue 1583)

/+ dub.json:
    {
        "name": "test",
        "dependencies": {
            "vibe-d:core": "0.7.29"
        }
    }
+/

import std.stdio;
import std.socket;
import std.datetime;
import vibe.core.core;

void main() {
    runTask({
        writeln("start task");
        auto pair = socketPair();
        auto evt = createFileDescriptorEvent(pair[1].handle, FileDescriptorEvent.Trigger.any);
        //destroy(evt);
        writeFile("dummy.txt", cast(immutable ubyte[]) "1234567890");
        writeln("end task");
        exitEventLoop();
    });
    runEventLoop();
}

I'll have to look into where exactly it hangs - it could be stuck in
libevent - but one issue is that socketPair creates the sockets in
blocking mode. You'd either have to use the Posix socketpair function
together with SOCK_NONBLOCK, or use fnctl on the socket(s) created
by socketPair to set them to non-blocking mode after creation.