I have written a piece of code where it is necessary to separate the UI Thread from my code's Thread. Due to certain reasons, I cannot share the main code, but I will provide an example here.
I want the UI to remain responsive while a function is executed that includes Sleep statements and For and While loops.
This creates interference with the UI, causing it to freeze.
I have tried several plugins, such as one that executes a secondary function on another Thread, but I encountered e