Bug?

2022-05-26 Thread JG via Digitalmars-d-learn
Hi, I was reading the source of std.algorithm cache and saw some code that didn't make sense to me with a comment indexing the [bug report](https://issues.dlang.org/show_bug.cgi?id=15891). Could anyone help to understand if this code is really necessary (meaning I have some misconception) or

Re: Error: undefined symbol: _WinMain@16 When try compile no console

2022-05-26 Thread Marcone via Digitalmars-d-learn
On Friday, 20 May 2022 at 13:16:00 UTC, frame wrote: On Thursday, 19 May 2022 at 20:20:49 UTC, Marcone wrote: I am using a main() function. I am compiling on Windows x86 32 bits. I am using DMD 2.100.0 This error is only in version 2.100.0 of DMD. Did you try 2.099 too? Because the default bu

Re: Error: undefined symbol: _WinMain@16 When try compile no console

2022-05-26 Thread frame via Digitalmars-d-learn
On Thursday, 26 May 2022 at 16:56:49 UTC, Marcone wrote: On Friday, 20 May 2022 at 13:16:00 UTC, frame wrote: On Thursday, 19 May 2022 at 20:20:49 UTC, Marcone wrote: I tried compiling now on x64 without console using -L/SUBSYSTEM:windows user32.lib -L/entry:mainCRTStartup -m64 and it doesn'

Re: Tracing/Profiling D Applications

2022-05-26 Thread Christian Köstlin via Digitalmars-d-learn
On 2022-05-26 01:05, frame wrote: On Wednesday, 25 May 2022 at 21:35:07 UTC, Christian Köstlin wrote: Is there also a way to get the "real" threadid? I'm using that functions inside threads: core.sys.windows.winbase.GetCurrentThreadId on Windows core.sys.posix.pthread.pthread_self on Unix (im

Re: Tracing/Profiling D Applications

2022-05-26 Thread Christian Köstlin via Digitalmars-d-learn
On 2022-05-25 23:56, Ali Çehreli wrote: On 5/25/22 14:35, Christian Köstlin wrote: > 1. I went for a singleton for storing tracing/logging information that > needs to be initialized manually. Is __gshared the right way to do that? I think this is where thread-local storage comes in handy. As

Re: Tracing/Profiling D Applications

2022-05-26 Thread Ali Çehreli via Digitalmars-d-learn
On 5/26/22 12:54, Christian Köstlin wrote: > I want to be able to dump > tracings even while the program is still running. Then I would have to > collect the tls data of all still running threads. I am not sure without testing but I am under the impression that mutexes can be very slow especial