scrive / pool

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

Allow user to configure stripe count #15

Closed parsonsmatt closed 1 year ago

parsonsmatt commented 1 year ago

There's a behavior difference in how the number of stripes vs the number of resources play together. While greater stripe count may benefit performance, it also allows more resources to be created.

This patch changes the code such that the number of stripes is specified and preserved.

parsonsmatt commented 1 year ago

Testing locally, this patch fixes the mysterious deadlock I'm getting with resource-pool-0.3.1.0 on the work codebase, so I suspect something else is going weird there.

Fortunately, this patch also reduces our test suite time from 1:50 to 1:35 - nearly 15 of time saved due to contention on the Pool!

arybczak commented 1 year ago

Superseded by #17.