Hello,

i use GTKD to draw some stuff on a DrawingArea. Because it needs some time to calculate i want to outsource those calculation so that the GUI doesn't freeze.

I tried it with "std.concurrency" like this:

bool drawCallback(Scoped!Context cr, Widget widget){
        writeln("init");
        spawn(&render, cr, widget);
        return true;
}

void render(Context cr, Widget widget){
Renderer renderer = new Renderer(new Vector3D(0,0,0), cr, widget);
        int  i = 0;
        while(i < 4){
                renderer.renderOneStep();
                i++;
        }
        renderer.DisplayResult();
}

But i get:

"std.concurrency.spawn(F, T...)(F fn, T args) if(isSpawnable!(F,T))" "Error: template std.concurrency.spawn cannot deduce function from argument types!()(void delegate(Context cr, Widget widget), Scoped Widget), candidates are:"

Reply via email to