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
I noticed in IOSetup, the finalizer for the Resource is never run (the finalizer returned from allocated is discarded). I think that's a reasonable thing to do, but it makes the typesignature of IOLambda.Simple#init a little disingenuous:
definit:Resource[IO, Init]
The user goes to the trouble of building a Resource, and probably assumes everything will be cleaned up when the Lambda instance is terminated, when in fact the finalizer is dropped on the floor.
Maybe def init: IO[Init] would be less misleading? Or at least a comment explaining that the finalizer won't be run would be helpful.
The text was updated successfully, but these errors were encountered:
I noticed in
IOSetup
, the finalizer for the Resource is never run (the finalizer returned fromallocated
is discarded). I think that's a reasonable thing to do, but it makes the typesignature ofIOLambda.Simple#init
a little disingenuous:The user goes to the trouble of building a Resource, and probably assumes everything will be cleaned up when the Lambda instance is terminated, when in fact the finalizer is dropped on the floor.
Maybe
def init: IO[Init]
would be less misleading? Or at least a comment explaining that the finalizer won't be run would be helpful.The text was updated successfully, but these errors were encountered: