Re: What is the best practice of organization multi-threading ?

2015-03-16 Thread Suliman via Digitalmars-d-learn
UP

Re: What is the best practice of organization multi-threading ?

2015-03-16 Thread Ali Çehreli via Digitalmars-d-learn
On 03/15/2015 01:53 PM, Suliman wrote: I have App that read config sections. If the section is true I want to run it in new thread. if (parseconfig.obsmpplots_load == true) { auto obsmpplots = new ObsmpPlots(db); auto theTask = task(obsmpplots.getPlots);

Re: What is the best practice of organization multi-threading ?

2015-03-16 Thread Ali Çehreli via Digitalmars-d-learn
On 03/16/2015 12:04 PM, Suliman wrote: Ali, please add text above to your book! Will do. Please email me your full name at acehr...@yahoo.com so that I can add it to the Acknowledgments section. Thank you, Ali

Re: What is the best practice of organization multi-threading ?

2015-03-16 Thread Suliman via Digitalmars-d-learn
Ali, please add text above to your book!

Re: What is the best practice of organization multi-threading ?

2015-03-16 Thread Suliman via Digitalmars-d-learn
Ali, again big thanks for your book, without it I was not able how to work with D. But for me now absolutely clear what difference between: auto theTask = task(someFunction); and: auto theTask = task!anOperation();

Re: What is the best practice of organization multi-threading ?

2015-03-16 Thread Ali Çehreli via Digitalmars-d-learn
On 03/16/2015 11:28 AM, Suliman wrote: difference between: auto theTask = task(someFunction); and: auto theTask = task!anOperation(); tl;dr - Prefer task!anOperation() unless you can't. :) task() is flexible enough to take what to execute either as a function (or delegate) pointer