Thread exits immediately with no reason.

solidstate1991 laszloszeremi at outlook.com
Mon Dec 20 23:56:16 UTC 2021


Here's this function, which serves as a thread entry point: 
https://github.com/ZILtoid1991/iota/blob/main/source/iota/audio/wasapi.d#L220

The problem is, that even with disabling all error-handling that 
would allow to shut down the thread safely, the thread only runs 
that while loop once.

However, if I set my debugger to have a breakpoint right at the 
loop entry it can kinda loop, however the real-time capabilities 
cease to work properly.

I'm using this handy application to debug my library: 
https://github.com/ZILtoid1991/iota/blob/main/testsource/app.d#L54

After the referenced line (where I start my audio thread) I also 
set the main program to wait 10 seconds. At least the audio 
thread just exits for some reason instead of being suspended by 
Thread.wait().


More information about the Digitalmars-d-learn mailing list