fork of https://github.com/gotamer/pool.