scrive / pool

A high-performance striped resource pooling implementation for Haskell
Other
18 stars 11 forks source link

the cleanup function is called within an `uninterruptibleMask` #34

Open MangoIV opened 8 months ago

MangoIV commented 8 months ago

uninterruptibleMask_ calls the cleanup function; if anything within the cleanup uses async exceptions, it will be masked.

A workaround for now is to use something like

withAsyncWithUnmask 
  do \unmask -> unmask cleanup 
  do wait