Skip to content

Unlifting issue when using unliftio-pool #291

Answered by arybczak
fpringle asked this question in Q&A
Discussion options

You must be logged in to vote

https://hackage.haskell.org/package/unliftio-pool-0.4.3.0/docs/src/UnliftIO.Pool.html#mkDefaultPoolConfig uses withRunInIO which is seqUnliftIO by default (it can be changed using withUnliftStrategy) and resources are destroyed in a different thread, hence the error. But since your create/destroy resource functions are in IO, the simplest solution is to not use unliftio-pool.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by fpringle
Comment options

You must be logged in to vote
1 reply
@arybczak
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #290 on January 06, 2025 19:52.