It's because runWorkerTask internally passes its arguments along to the function by value:

https://github.com/vibe-d/vibe.d/blob/master/core/vibe/core/core.d#L364

The workaround is to pass a pointer instead:

    void getServiceStatus(MyUrl* url) {
        // ...
    }

    // ...

    runWorkerTask(&getServiceStatus, &url);


void getServiceStatus(MyUrl* url)
{
...
}


Error: static assert: "Cannot convert arguments '(MyUrl)' to function arguments '(MyUrl*)'."

Reply via email to