Choosing Between `scoped` and `acquireRelease` for Cleanup in Effect
Hey all. I'm looking at implementing a service in effect that collects some keys and values that will be emitted at the end of a lambda invocation as a wide event. I'd thought that maybe a scoped effect would be good for this so that when the handler function for the lambda finishes the values are automatically emitted as part of the clean up of the scope.
I'd been looking to use the
I'd looked at
I'd been looking to use the
scoped constructor in Effect.Service but I don't understand how you indicate what code you want run as part of the clean up?I'd looked at
Effect.acquireRelease too but I'm not entirely sure which one I should be picking.