Timers and Windows - not firing if set to mode two from within a running Thread?

Whats your Thread.Priority ?

Oh I see its 5 from above. Thats set in the ide? You dont set it in code somewhere by accident?

Edit, can you double check that by debuglogging that near the top of the Thread.Run ?

Nope, I have a test here running a dir /s c: which takes ages, and its working fine, so I’m scratching my head as to Tims problems at the moment, just thinking of all things that could cause problems.

After you try the above, try just before:

Loop Until Finished or TimedOut

put

app.YieldToNextThread

And see if you get interactivity back.

Added the App.YieldToNextThread and App.SleepCurrentThread(5) in a If App.CurrentThread >? Nil block in two separate tests and not change.

I now have a Break call at the top of the method and it is Breaking there. But a break in the Timer’s Action even never fires. The same code on Linux and macOS break properly at both locations.

Put this just before you call the Thread.Run and put it again at the top of the Thread.Run event and see if they are different.

Declare Function GetCurrentThreadId Lib "Kernel32" () As UInt32 Dim tID As UInt32 = GetCurrentThreadId() system.DebugLog("tID=" + str(tID))

Oh and what did the thread priority come back as in the debuglog inside Thread.Run ? 5?