|
@@ -1,6 +1,8 @@
|
|
|
|
|
|
// todo test https://dlang.org/phobos/std_parallelism.html
|
|
// todo test https://dlang.org/phobos/std_parallelism.html
|
|
-
|
|
|
|
|
|
+// https://git.4dev.win/221V/vibed_test2/src/4d2bd29ff6d5199507146a14f0ce07d863c776f2/vtest2/source/app.d
|
|
|
|
+// https://chat.qwen.ai/c/5cfd2bc3-66eb-4ca5-a2cd-7126e99e4dc4
|
|
|
|
+// https://vibed.org/api/vibe.core.channel/
|
|
|
|
|
|
alias uint8 = ubyte;
|
|
alias uint8 = ubyte;
|
|
alias uint64 = ulong;
|
|
alias uint64 = ulong;
|
|
@@ -32,10 +34,11 @@ void test1_worker(int n){
|
|
|
|
|
|
while(true){
|
|
while(true){
|
|
//Thread.sleep(dur!"seconds"(120));
|
|
//Thread.sleep(dur!"seconds"(120));
|
|
|
|
+
|
|
Thread.sleep(dur!"seconds"(3));
|
|
Thread.sleep(dur!"seconds"(3));
|
|
|
|
|
|
auto v20 = fact(20);
|
|
auto v20 = fact(20);
|
|
- writeln("worker = ", n, " fact 20 = ", v20);
|
|
|
|
|
|
+ writeln("worker = ", n, " fact 20 = ", v20); // this is sync lock ((
|
|
}
|
|
}
|
|
|
|
|
|
Thread.sleep(dur!"seconds"(3));
|
|
Thread.sleep(dur!"seconds"(3));
|
|
@@ -48,6 +51,7 @@ void test1_spawner(){
|
|
//uint8 i = 10; // 10 = 1.8 Mb RAM // 255 = 2.9 Mb RAM // 1000 = 6.1 Mb RAM // 10_000 = 47.9 Mb RAM // 100_000 = 180.3 -> 434.4 Mb RAM ,, 161.8 -> 607.7 Mb RAM
|
|
//uint8 i = 10; // 10 = 1.8 Mb RAM // 255 = 2.9 Mb RAM // 1000 = 6.1 Mb RAM // 10_000 = 47.9 Mb RAM // 100_000 = 180.3 -> 434.4 Mb RAM ,, 161.8 -> 607.7 Mb RAM
|
|
//int i = 100_000; // fails
|
|
//int i = 100_000; // fails
|
|
int i = 30_000;
|
|
int i = 30_000;
|
|
|
|
+ //int i = 35_000; // fails
|
|
|
|
|
|
/**/
|
|
/**/
|
|
while(i > 0){
|
|
while(i > 0){
|