My pleasure to be of any help! - and not to forget, the original poster for that technique was actually @Rob, I only added some test results on timing and memory/processor usage
One good thing I like about Unity Coroutines (IEnumerator return type), (unlike the .NET System.Threading API,) they don’t complain as much about not being on the [UnityEngine] mainthread when you try to interact with other gameobjects.
Thanks to the difficulties with getting StopCoroutine to actually work (just google “stopcoroutine not working”)
I was working on a reliable method for remotely signalling Coroutines to self-destruct/end (using bool flags rather than callbacks/events) but there are several possible techniques [besides StopCoroutine] - (a) initiate a singleton Coroutine (single IEnumerator returned) so you only have to worry about one Coroutine for a given method running at a time and (b) save that IEnumerator handle for a given Coroutine so you can remote-kill it at any time with StopCoroutine
https://docs.unity3d.com/ScriptReference/MonoBehaviour.StopCoroutine.html
I’ll keep working on it