trophy 0
May 2025 109 posts
Sandbox.TaskSource.WorkerThread : api/Sandbox.TaskSource/WorkerThread
trophy 820
May 2023 32 posts
Switches execution to a background worker thread. You should not touch engine objects while in worker threads

Example:
await ts.WorkerThread();
var data = LoadFromDisk(); // Generic expensive function that would freeze the main thread
await ts.MainThread();     // Return to MainThread after our work is done so we can touch engine objects again

ApplyData(data); 


people
Log in to reply
You can't reply if you're not logged in. That would be crazy.