You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the Future library uses the coroutine library to yield and resume threads, however - by doing this you're taking the responsibility of coroutine errors.
I have found that in Future.luau - we are resuming a thread, without validating if it has errored or not. This can lead to silent errors that don't tell the developer what issue they're facing.
I would appreciate if there is some error handling thrown into the Future lib so in the event a coroutine has been resumed errors out, the developer is made aware of it.
an example of where this can be problematic:
localfuture=require("future")
localtask=require("@lune/task")
future.Future
.new(function()
task.wait(1)
return1end)
:await()
:unwrapOk()
error(123) -- never prints, this was resumed by the `:await` call, but this 123 never gets to the output because we don't error handle 👀
The text was updated successfully, but these errors were encountered:
Currently, the Future library uses the coroutine library to yield and resume threads, however - by doing this you're taking the responsibility of coroutine errors.
I have found that in Future.luau - we are resuming a thread, without validating if it has errored or not. This can lead to silent errors that don't tell the developer what issue they're facing.
I would appreciate if there is some error handling thrown into the Future lib so in the event a coroutine has been resumed errors out, the developer is made aware of it.
an example of where this can be problematic:
The text was updated successfully, but these errors were encountered: