Ellpeck / Coroutine

A simple implementation of Unity's Coroutines to be used for any C# project
https://www.nuget.org/packages/Coroutine
MIT License
37 stars 3 forks source link

Demostrate the issue and add unit test #11

Closed zaafar closed 3 years ago

zaafar commented 3 years ago

WARNING: this fails the CI pipeline.

zaafar commented 3 years ago

the way i see it is that there can be 2 fixes.

(1) don't add/remove coroutines in raise event. This is very simple fix i.e. easy to test/read/understand. (2) if we really want to add/remove corotuines in raise event. Let's not add/remove time based coroutines.

Ellpeck commented 3 years ago

We do really want to add/remove coroutines in raise event, because otherwise event-based coroutine logic depends on the Tick method, which I fundamentally dislike. Not removing time-based coroutines makes a lot of sense, so I'll work on that improvement right now.

zaafar commented 3 years ago

sounds good! once you do that I will do some more testing to make sure there aren't any loopholes. :)

Ellpeck commented 3 years ago

Thanks!

zaafar commented 3 years ago

Tested it. No issues left. Thanks!