independent or parallel process

drpepper dp at pepper.com
Wed Oct 17 19:46:52 PDT 2012


I want the function below to run independently -- like a unix
background process, without delaying subsequent code in main.  I
tried the following using std.parallelism:

void main() {
    function_a(int a, int b) {
     ...
    }

    auto new_task = task!function_a(11, 12);
    new_task.executeInNewThread(1);

    // more code ...
}


I get errors: core.thread.ThreadException ... unable to set
thread priority ...


More information about the Digitalmars-d-learn mailing list