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

Outstanding Coroutines should not be added when caller is raising events. #9

Closed zaafar closed 3 years ago

zaafar commented 3 years ago

i.e. remove this line here

This is because caller can raise events from within a coroutine. However, it's highly unlikely for the caller to call Tick from within a coroutine. I will create a unit test to show this bug.

zaafar commented 3 years ago

Unfortunately, it does means that if the caller never ever calls tick function, their coroutines will not be added.

I don't see this ever happening ^ (other than in the event-based unit tests I created :( )

zaafar commented 3 years ago

Just created the unit test. Actually this doesn't fix the issue. I will close this issue and open a new one. (sorry about that)