Package resusage issue.

2023-08-25 Thread vino via Digitalmars-d-learn
Hi All, I am trying to use the package resusage, and I am getting the below error message, googled for this error and tried all the solution provided still facing the same issue, hence requesting your help. Solution Provided ``` dism.exe /image:C: /cleanup-image /revertpendingactions dism.

Re: parallel threads stalls until all thread batches are finished.

2023-08-25 Thread Joe--- via Digitalmars-d-learn
On Friday, 25 August 2023 at 21:43:26 UTC, Adam D Ruppe wrote: On Wednesday, 23 August 2023 at 13:03:36 UTC, Joe wrote: to download files from the internet. Are they particularly big files? You might consider using one of the other libs that does it all in one thread. (i ask about size cuz m

Re: parallel threads stalls until all thread batches are finished.

2023-08-25 Thread Joe--- via Digitalmars-d-learn
On Friday, 25 August 2023 at 21:31:37 UTC, Ali Çehreli wrote: On 8/25/23 14:27, j...@bloow.edu wrote: > "A work unit is a set of consecutive elements of range to be processed > by a worker thread between communication with any other thread. The > number of elements processed per work unit is con

Re: Cool pattern or tragic?

2023-08-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, August 25, 2023 3:00:08 PM MDT Guillaume Piolat via Digitalmars-d- learn wrote: > The idea is to deliberately mark @system functions that need > special scrutiny to use, regardless of their memory-safety. > Function that would typically be named `assumeXXX`. > > > > ```d > class MyEncode

Re: Cool pattern or tragic?

2023-08-25 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
I do something similar with my error types. I have a method called assumeOkay. It'll assert if it isn't ok. There is also unsafeGetLiteral for slice based types. All @system.

Re: parallel threads stalls until all thread batches are finished.

2023-08-25 Thread Adam D Ruppe via Digitalmars-d-learn
On Wednesday, 23 August 2023 at 13:03:36 UTC, Joe wrote: to download files from the internet. Are they particularly big files? You might consider using one of the other libs that does it all in one thread. (i ask about size cuz mine ive never tested doing big files at once, i usually use it

Re: parallel threads stalls until all thread batches are finished.

2023-08-25 Thread Ali Çehreli via Digitalmars-d-learn
On 8/25/23 14:27, j...@bloow.edu wrote: > "A work unit is a set of consecutive elements of range to be processed > by a worker thread between communication with any other thread. The > number of elements processed per work unit is controlled by the > workUnitSize parameter. " > > So the question

Re: parallel threads stalls until all thread batches are finished.

2023-08-25 Thread Joe--- via Digitalmars-d-learn
On Wednesday, 23 August 2023 at 14:43:33 UTC, Sergey wrote: On Wednesday, 23 August 2023 at 13:03:36 UTC, Joe wrote: I use foreach(s; taskPool.parallel(files, numParallel)) { L(s); } // L(s) represents the work to be done. If you make for example that L function return “ok” in case file succ

Cool pattern or tragic?

2023-08-25 Thread Guillaume Piolat via Digitalmars-d-learn
The idea is to deliberately mark @system functions that need special scrutiny to use, regardless of their memory-safety. Function that would typically be named `assumeXXX`. ```d class MyEncodedThing { Encoding encoding; /// Unsafe cast of encoding. void assumeEncoding (Encoding e

Re: parallel threads stalls until all thread batches are finished.

2023-08-25 Thread Joe--- via Digitalmars-d-learn
On Wednesday, 23 August 2023 at 14:43:33 UTC, Sergey wrote: On Wednesday, 23 August 2023 at 13:03:36 UTC, Joe wrote: I use foreach(s; taskPool.parallel(files, numParallel)) { L(s); } // L(s) represents the work to be done. If you make for example that L function return “ok” in case file succ

Config and Config.Flags difference

2023-08-25 Thread vino via Digitalmars-d-learn
Hi All, Request you to please help me in understanding the difference between the below 2, if possible with an example. Config.suppressConsole Config.Flags.suppressConsole From, Vino.

Help on reading an yaml file using dyaml

2023-08-25 Thread vino via Digitalmars-d-learn
Hi All, Request your help on reading a yaml file using dyaml. input.yaml ``` name: "This is test Program" program: prg: "whoami" args: "/?" env: config: flag: workdir: shellPath: ``` Program: ``` import dyaml; import std.stdio; void main () { Node config;