Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gabime/async flush #3235

Merged
merged 3 commits into from
Nov 1, 2024
Merged

Gabime/async flush #3235

merged 3 commits into from
Nov 1, 2024

Conversation

gabime
Copy link
Owner

@gabime gabime commented Nov 1, 2024

Revert PR #3049 to make async_logger->flush() fully async since it might get stuck under multi-thread load and since std::future have gcc problems (see #3221, #3228, #3232)

@gabime gabime merged commit 63d1884 into v1.x Nov 1, 2024
14 of 16 checks passed
@gabime gabime deleted the gabime/async-flush branch November 1, 2024 10:05
@rtzoeller
Copy link

@gabime is there a way to force a synchronous flush after this change? I have some unit tests which validated that messages were being logged as expected, and they relied on calling logger->flush(); to ensure stdout was updated.

@gabime
Copy link
Owner Author

gabime commented Nov 9, 2024

The closest I can think of is wait until the queue is empty, send a flush message and then wait again for the queue to empty.

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