DFL background tasks

thedeemon via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 10 21:15:22 PDT 2015


On Wednesday, 10 June 2015 at 22:18:21 UTC, Scroph wrote:
> 	client.perform;
> 	while(!client.isStopped)

I don't think this will work as you expect. "perform" is a 
synchronous call, it will not return until the download finishes, 
as I understand, so your while loop is too late. I think you 
should insert message processing stuff inside onProgress, though 
it's also suboptimal (if no progress for long time - no joy). 
Proper design will require more thought...


More information about the Digitalmars-d-learn mailing list