fix occasional crash in cpu pool
authorJames Sedgwick <jsedgwick@fb.com>
Fri, 19 Sep 2014 10:19:17 +0000 (03:19 -0700)
committerdcsommer <dcsommer@fb.com>
Fri, 19 Sep 2014 22:30:56 +0000 (15:30 -0700)
commite3e4ab20f6b07ac2c4b73d56228a0e8abeca5023
tree96397ecad944dab033fb3d4f7efb9875d2eb1eb2
parentea6c80145926b0a87787b8301ff8f2c3df170049
fix occasional crash in cpu pool

Summary: need to initialize threadsToStop_ and make it signed so it doesn't underflow in rare races

Test Plan: cpu pool unit tests no longer crash if run a ton of times

Reviewed By: davejwatson@fb.com

Subscribers: fugalh, njormrod

FB internal diff: D1563524
folly/experimental/wangle/concurrent/CPUThreadPoolExecutor.h