Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Pause all PantsService threads before forking a pantsd-runner #6671
As described in #6565, I had a fundamental misunderstanding of what was legal during a fork, which resulted in intermittent hangs when a
As mentioned on the ticket, the
Rather than using a lock to approximate all of the other locks, instead ensure that all Service threads that might interact with any non-private locks are "paused" in well-known locations ("safe points"?) while we fork. Since we would like to have more and more-fine-grained locks over time, while keeping the number of un-pooled threads relatively constrained, adding this bookkeeping to service threads seems like the right tradeoff.
While we continue to move toward a world (via
referenced this pull request
Oct 28, 2018
Setting next lease time is broken, but this otherwise looks good.