parallelism with delegate
    Vitaliy Fadeev 
    vital.fadeev at gmail.com
       
    Fri Sep 22 04:24:19 UTC 2023
    
    
  
able ?
how to use correctly?
```d
   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
```d
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
    
    
More information about the Digitalmars-d-learn
mailing list