Async - Polysemy

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Edward Yang

Does polysemy's async from the Polysemy.Async package have the same gotchas as its equivalent in the async package itself?
The async package recommends to use withAsync to avoid thread leaks. Would this be a problem with polysemy's async function?

Edward Yang

What's the main issues using withLowerToIO? I understand most of the polysemy team doesn't like this, and is removed in the v2 draft (as explained by googleson).
I don't doubt the team's decision on this, I simply want to understand what problems came with using the forklift effect.

I'm working on a backend server where I'm dealing with thread leaks after introducing withAsync to it.
Since I'm not sure what else to do, I tried using withLowerToIO and withAsync from the async package itself.
This cancels the threads properly now, but is there any obvious gotchas? This is my reason for asking about the issues that come with using withLowerToIO.
I'm using this as a band-aid solution for now until a proper fix comes out. Looking forward to your thoughts!

Edit: Nevermind looks like I'm already seeing another issue pop-up. Still interested in why withLowerToIO is bad, other than it using an extra thread