mirror of
https://github.com/Ellpeck/Coroutine.git
synced 2024-11-21 13:23:29 +01:00
cleanup
This commit is contained in:
parent
0de8a0dd2d
commit
0e5b571590
2 changed files with 2 additions and 2 deletions
|
@ -132,7 +132,7 @@ namespace Coroutine {
|
|||
var coroutines = this.GetOutstandingCoroutines(evt);
|
||||
if (coroutines.Count > 0) {
|
||||
coroutines.RemoveWhere(c => {
|
||||
var list = c.IsWaitingForEvent ? this.GetEventCoroutines(c.Event, true) : this.tickingCoroutines;
|
||||
var list = evt ? this.GetEventCoroutines(c.Event, true) : this.tickingCoroutines;
|
||||
var position = list.BinarySearch(c);
|
||||
list.Insert(position < 0 ? ~position : position, c);
|
||||
return true;
|
||||
|
|
|
@ -268,7 +268,7 @@ namespace Tests {
|
|||
CoroutineHandler.RaiseEvent(myEvent);
|
||||
Assert.AreEqual(1, counterShouldExecuteAfter, $"ShouldExecuteAfter counter {counterShouldExecuteAfter} is invalid.");
|
||||
Assert.AreEqual(1, counterShouldExecuteFinally, $"ShouldExecuteFinally counter {counterShouldExecuteFinally} is invalid.");
|
||||
|
||||
|
||||
before1.Cancel();
|
||||
after.Cancel();
|
||||
before0.Cancel();
|
||||
|
|
Loading…
Reference in a new issue