ConsoleApplication.YieldToNextThread
From Xojo Documentation
Method
Triggers a thread context change.
Notes
This causes the Thread Scheduler to yield the currently executing thread's processing time to the next Thread in the queue that is awaiting processing cycles. It is possible for the next Thread to be the currently executing Thread.
Calling this in a web application from any event of WebSession, WebControl or any WebControl subclass will raise an exception. If you're trying to update the browser, call UpdateBrowser instead.