Skip to content

explicitly destroying io_serv at the end of shutdown#7

Merged
heifner merged 1 commit intomasterfrom
feature/explicit-io-serv-destruction
Nov 30, 2017
Merged

explicitly destroying io_serv at the end of shutdown#7
heifner merged 1 commit intomasterfrom
feature/explicit-io-serv-destruction

Conversation

@wanderingbort
Copy link

when the io_serv is stopped it may still own std::functions/lambdas that have captured data in them. If this captured data relies on another system like a logging system, for instance, waiting for destructors to be called by the atexit call may result in them accessing a destroyed system. By explicitly resetting the io_serve after shutdown we in turn release any resources it has while the systems are still alive and well

when the io_serv is stopped it may still own std::functions/lambdas that have captured data in them.  If this captured data relies on another system like a logging system, for instance, waiting for destructors to be called by the atexit call may result in them accessing a destroyed system.  By explicitly resetting the io_serve after shutdown we in turn release any resources it has while the systems are still alive and well
@heifner heifner merged commit 476f58d into master Nov 30, 2017
@heifner heifner deleted the feature/explicit-io-serv-destruction branch February 27, 2018 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants