Resume needs a sleep?

I have a thread which suspends itself for some reason and a timer which polls the thread’s state to update the UI. Its the timer’s action handler too, who resumes the thread after the UI update work is done. I do have this “construction” (not the same code) twice and run into problems with one of them:
the thread doesn’t resume after my call to resume.
It took me hours to find a solution, which irritates me a lot and will give me bad nights: I put a App.SleepCurrentThread(50) just behind the resume-statement.
I know resume() doesn’t force a context switch and this isn’t necessary for my code. But it sets the thread’s state to running, so my timer will not run into the same clause again.
Has anybody seen such a behavior too?
Thanx in advance.

P.S. Is it necessary to put the polling of the thread’s state into a critical section?

Are you using Xojo 2016r2? That’s a bug.

Exactly …
Thanx Beatrix.

As from case 44704 this is really a bug in Xojo 2016r2. Hopefully it will be fixed in 2016r2.1 !!!
App.SleepCurrentThread() after resume doesn’t always help…

In Xojo 2016r11 resume works fine.

By the way, I don’t understand why a patch isn’t around yet. There must be thousands apps around which needs this, aren’t there?

I need this too…