Fix race conditions in pool.go.
Merge pull request #2 from sougou/patch-2

Fix race conditions in pool.go.