Relase control from main thread

I vaguely remember that Xojo had a function that would release control of the main xojo thread so that other program processes would have a chance to run. Is there?

What are you doing on the main thread that makes it run for so long? Main thread should be answering mouse clicks etc, not much more than that. Any long-running work should be done in other threads.

You could look at YieldToNext() but I expect that’s intended for long running non-main threads.

I think you are looking for DoEvent(), but it’s a cursed function that exists but should never be used, or just on console apps…

Regards, Antoine