On 01/04/2016 06:31 AM, TheDGuy wrote:

> I tried it with "std.concurrency" like this:
>
> bool drawCallback(Scoped!Context cr, Widget widget){
>      writeln("init");
>      spawn(&render, cr, widget);

The first parameter to render() is Scoped!Context but render() takes a Context:

> void render(Context cr, Widget widget){

Unless there is implicit conversion from Scoped!Context to Context, it won't work. Perhaps you need to call an accessor like the following?

    spawn(&render, cr.some_accessor(), widget);

Ali

Reply via email to