Currently you can only timeout a lambda node, but it might be useful to for timeout to also work on IStartableCoroTask (I assume this would start the task, not return a new IStartableCoroTask which has a timeout which starts once its started).
Since we lack real overloads I think the best we can do is something along the lines of timeoutLambda and timeoutStartableTask. I don't know if there are any other overloads we would want but I'm guessing we'll also come across this issue with other functions we add. To prevent Coro becoming very bogged down might it be worth having a Timeout.hx file which has all these functions in it?
User would then have to do import hxcoro.Timeout.* to get all the functions, although module level fields might help here.
Currently you can only timeout a lambda node, but it might be useful to for timeout to also work on
IStartableCoroTask(I assume this would start the task, not return a newIStartableCoroTaskwhich has a timeout which starts once its started).Since we lack real overloads I think the best we can do is something along the lines of
timeoutLambdaandtimeoutStartableTask. I don't know if there are any other overloads we would want but I'm guessing we'll also come across this issue with other functions we add. To preventCorobecoming very bogged down might it be worth having aTimeout.hxfile which has all these functions in it?User would then have to do
import hxcoro.Timeout.*to get all the functions, although module level fields might help here.