| 431 | void ParentAfterFork() { mutex_.unlock(); } |
| 432 | |
| 433 | void ChildAfterFork() { |
| 434 | int desired_capacity = desired_capacity_; |
| 435 | bool please_shutdown = please_shutdown_; |
| 436 | bool quick_shutdown = quick_shutdown_; |
| 437 | new (this) State; // force-reinitialize, including synchronization primitives |
| 438 | desired_capacity_ = desired_capacity; |
| 439 | please_shutdown_ = please_shutdown; |
| 440 | quick_shutdown_ = quick_shutdown; |
| 441 | } |
| 442 | |
| 443 | std::shared_ptr<AtForkHandler> atfork_handler_; |
| 444 | }; |