I need to have a spawn function or a coroutine wrap in my script, for performance i want to close the threads. The problem is: when I try to close / cancel the thread i made from inside of the thread (the spawned function or coroutine wrap function) it errors and doesn’t cancel it.
By the way I’d probably use the task library unless you have a specific use for coroutines. They’re quite different but if task.cancel and task.spawn work well together. Have a nice day