Calling compiler flags in file

2024-03-08 Thread Cnerd
I am trying to call the compiler flags `--threads:off` and `--mm:arc` from the nim file I am working on. Is there a nim way to do this.

Have I written a silly program or is there a "controlled" memory leak?

2024-03-08 Thread zevv
valgrind is your friend.

Cuticara: Why Is It So Great To Have Better Skin And Nails?

2024-03-08 Thread eyefortinuse
The essential strength of Cuticara oil is its normal plan. Its cautiously organized equation permits a continuous decrease in toenail contagious contamination without any chance of the parasite creating protection from the treatment. Thus, the Cuticara equation assists you with disposing of toen

subset of enum values

2024-03-08 Thread Zoom
Good question. You can probably mimic the required behaviour with the exception tracking.

Releasing threads resources (OS) after joinThread on windows

2024-03-08 Thread Isofruit
If you use async (regardless of if you use the default or chronos), you _must_ use ORC/refc or you'll run into memory leaks. Also you need to clean up the asyncdispatcher that comes with them.

Releasing threads resources (OS) after joinThread on windows

2024-03-08 Thread eagledot
Generally i am quite vigilant about what i allocate and what resources i might be using, and define `destructors` accordingly. But in this case i was only using `createThread` and `joinThread` standard routines , i only discovered the issue while benchmarking . I also came across some thread va

Releasing threads resources (OS) after joinThread on windows

2024-03-08 Thread eagledot
Thanks for replying! I know about @mratsim weave and yours Malebolgia. But i work on a BLAS backend in pure nim, and for me it is better to use `createThread` directly even though it would have some `overhead` , this `fork-join` pattern suits well for some of the routines i have implemented. I

Releasing threads resources (OS) after joinThread on windows

2024-03-08 Thread Araq
> I am wondering if i am supposed to call closeHandle manually after joinThread > to deallocate threads' resources, on windows atleast ? You are not supposed to call "closeHandle". `joinThread` should probably do that for you. But `createThread` is for writing a thread pool, for anything else u

Releasing threads resources (OS) after joinThread on windows

2024-03-08 Thread Isofruit
Yes. Generally, joinThread will not clean up thread-variable resources for you. Depending on what you use, you will need to deallocate their resources too. That _includes_ the per thread GC-related variables from ORC. In my (in progress) multithreading lib I have to do so as well. See below the

Releasing threads resources (OS) after joinThread on windows

2024-03-08 Thread eagledot
@Araq could you please take a look? Some suggestion would be good enough !

what is the nim equivalent to the python None type

2024-03-08 Thread Araq
> In most cases, you should use Option if you need something that could be > none, and avoid nil, even on reference types. I beg to differ. It allows for the state `Some(nil)` which you cannot easily prevent at compile time.