|
@@ -1,7 +1,7 @@
|
|
|
|
|
|
import std.stdio;
|
|
import std.stdio;
|
|
|
|
|
|
-/*
|
|
|
|
|
|
+/**/
|
|
// test1
|
|
// test1
|
|
//import std.parallelism : defaultPoolThreads;
|
|
//import std.parallelism : defaultPoolThreads;
|
|
import std.concurrency : spawn;
|
|
import std.concurrency : spawn;
|
|
@@ -9,7 +9,7 @@ import core.time : Duration, dur;
|
|
import core.thread : Thread;
|
|
import core.thread : Thread;
|
|
|
|
|
|
import test1 : test1_spawner;
|
|
import test1 : test1_spawner;
|
|
-*/
|
|
|
|
|
|
+/**/
|
|
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -22,7 +22,7 @@ import test2 : test2_spawner;
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
|
|
-/**/
|
|
|
|
|
|
+/*
|
|
// test3
|
|
// test3
|
|
//import std.parallelism : defaultPoolThreads;
|
|
//import std.parallelism : defaultPoolThreads;
|
|
import std.concurrency : spawn, send;
|
|
import std.concurrency : spawn, send;
|
|
@@ -30,7 +30,7 @@ import core.time : Duration, dur;
|
|
import core.thread : Thread;
|
|
import core.thread : Thread;
|
|
|
|
|
|
import test3 : test3_spawner;
|
|
import test3 : test3_spawner;
|
|
-/**/
|
|
|
|
|
|
+*/
|
|
|
|
|
|
|
|
|
|
void main(){
|
|
void main(){
|
|
@@ -38,9 +38,9 @@ void main(){
|
|
//defaultPoolThreads(8); // changes nothing because all threads works on 1 CPU core, not on multicores..(
|
|
//defaultPoolThreads(8); // changes nothing because all threads works on 1 CPU core, not on multicores..(
|
|
//writeln("defaultPoolThreads = ", defaultPoolThreads()); // 8
|
|
//writeln("defaultPoolThreads = ", defaultPoolThreads()); // 8
|
|
|
|
|
|
- //spawn(&test1_spawner); // test1 run
|
|
|
|
|
|
+ spawn(&test1_spawner); // test1 run
|
|
//spawn(&test2_spawner); // test2 run
|
|
//spawn(&test2_spawner); // test2 run
|
|
- spawn(&test3_spawner); // test3 run
|
|
|
|
|
|
+ //spawn(&test3_spawner); // test3 run
|
|
|
|
|
|
//Thread.sleep(dur!"seconds"(125));
|
|
//Thread.sleep(dur!"seconds"(125));
|
|
Thread.sleep(dur!"seconds"(30));
|
|
Thread.sleep(dur!"seconds"(30));
|