mirror of
https://github.com/Ellpeck/Coroutine.git
synced 2024-05-17 22:58:46 +02:00
cleanup
This commit is contained in:
parent
0de8a0dd2d
commit
0e5b571590
|
@ -132,7 +132,7 @@ namespace Coroutine {
|
||||||
var coroutines = this.GetOutstandingCoroutines(evt);
|
var coroutines = this.GetOutstandingCoroutines(evt);
|
||||||
if (coroutines.Count > 0) {
|
if (coroutines.Count > 0) {
|
||||||
coroutines.RemoveWhere(c => {
|
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);
|
var position = list.BinarySearch(c);
|
||||||
list.Insert(position < 0 ? ~position : position, c);
|
list.Insert(position < 0 ? ~position : position, c);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue