- Change a `queue:len/1` call during a checkout in the ready state to use `queue:is_empty/1`. All operations in poolboy that aren't informational or disaster recovery should now theoretically be O(1). - There is now "transaction" support using `transaction/2`. This will run a user defined function passed the worker checked out in a try block, ensuring that the worker is checked back into the pool should the operation fail. - A `child_spec/2` helper for embedding poolboy pools within your supervisors. - Documentation updates.
- Monitors are now stored in an ETS table. Simple profiling revealed that a lot of time was being taken in `lists:keytake/3` looking up the refs by pid. This should provide O(1) constant time lookup. - Workers are now no longer required to handle `stop` messages. Workers are terminated using `supervisor:terminate_child/2` and the shutdown strategy is no longer brutal_kill. - Other various cleanups.
When a pid exited while the pool was full and there were blocking checkouts, poolboy would put the pid of the process requesting a worker in the monitor tuple along with the monitor ref, instead of the pid of the worker.
… length in all tests. Add user_death test to check that an orphaned worker is killed when a monitored user is reported 'DOWN'.
A bunch of these tests will fail against vanilla poolboy right now.