able ?
how to use correctly?
import std.parallelism;
auto async_task = task!fn( args ); // error
// Error: no property `opCall` for type `app.A`, did you mean `new A`?
async_task.executeInNewThread();
where
auto a = new A();
auto fn = &a.download;
class A
{
void fn( string url )
{
// DO
}
}
Playground:
https://run.dlang.io/is/HvhtoP
gist:
https://gist.github.com/run-dlang/218b69e1afd79e5944ea10aa7ca61e1b