Trying out preemptive threads in a console app, and it no matter how much sleep time I give the threads or the main event loop, the process uses exactly 100% CPU in activity monitor. Is this normal? I can’t imagine it would be, but I figured I’d ask.
Switching to cooperative brings the CPU down to normal levels.
Thanks. For what it’s worth, I’m not using SleepCurrent myself, but that probably doesn’t matter. Mine is just DoEvents to run the main loop, and Self.Sleep inside the thread class.
Technically it helped. But practically it did not. I was already on the beta, but was a build or two behind. So now I’m around 98% CPU instead of 100%. Progress!