Thread.Pause

From Xojo Documentation

Method

Thread.Pause()

New in 2019r2

Supported for all project types and targets.

Puts the thread in a paused state. Every call to Pause must be matched by a call to Resume.

Notes

The thread will not be allocated any processing cycles, regardless of its assigned Priority. It is “asleep.” To wake it up, call the Resume method. If the thread is executing when you call Pause, it will immediately cause a context switch.

Example

This example calls Pause, followed by a call to Resume after other code has executed.

LongProcessThread1.Pause
// do something else here...
LongProcessThread1.Resume