-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I'm not very familiar with coroutines, but I couldn't see any obvious way to terminate all remaining/active coroutines when using WaitAny (as it currently is, the remaining coroutines could keep running in the background indefinitely).
To do so I added a new line of code to Wrapper. It seems to work, but I don't know whether it is good practice:
private IEnumerator Wrapper(IEnumerator e, int index)
{
while (true)
{
if(e != null && e.MoveNext())
{
_wait[index] = true;
yield return e.Current;
}
else
{
_wait[index] = false;
break;
}
if (!keepWaiting) { yield break; } // NEW LINE: to quit all coroutines once WaitAny no longer returns true (?????)
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels