Refactoring libboostasio (part 4)#558
Open
paolopas wants to merge 17 commits intoCopernicaMarketingSoftware:masterfrom
Open
Refactoring libboostasio (part 4)#558paolopas wants to merge 17 commits intoCopernicaMarketingSoftware:masterfrom
paolopas wants to merge 17 commits intoCopernicaMarketingSoftware:masterfrom
Conversation
replaces get_dispatch_wrapper, switched from boost:: to std::bind and std::function
…re#464) appended LibBoostAsioHandler ctor parameter (with default value) uint16_t connection_timeout = 60
slow down the heartbeat emission if the client has already sent data within the negotiated timeout, a similar improvement was suggested for LivEvHandler in CopernicaMarketingSoftware#550
race condition due to *_pending flags no more possible, updated footnote with important information for handler's user
This was referenced Dec 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This is the fourth child, the code is branched from #557 (third child), so this one accumulate the changes.
Each commit has been checked for regressions.
README.mdWatcherhas gotten rid of the*_pendingflags which were a potential cause of race conditions, as described in the handler footnote in the previous commit.In the actual version of the footnote in
libboostasio.h, I wanted to provide a description of the typical problems that can arise when using this handler. But some fundamental suggestions on how to prevent them are still missing. This will certainly be helpful to many developers, and I believe it will soon be helpful to us as well. In fact, I have one last improvement planned that I think libboostasio should be made before it can be forgotten about for a long time. But I intend to discuss this in more detail in #550.I'm attaching the current version of the handler for anyone curious to read or experiment.
Important
libboostasio_2025-12-13.zip
Personally, I'm satisfied with the result, and I must confirm that compared to the version I had attached in the original PR, the only thing that was left out is now in commit 2f10c1f but in the meantime I did a lot of tests and I'm sure of the result, in addition to having definitely come out better (you know, the second time is always better...).
But @EmielBruijntjes stay tuned because there's really only one last thing missing.