Usage of existing thread_pool #3118
Unanswered
FelixPetriconi
asked this question in
Q&A
Replies: 1 comment
-
What do you mean ? which OS API provides this ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are currently working in our app against the thread inflation and the thread_pool of spdlog is one that I am currently looking into.
On Mac and Windows already the OS thread-pools running and from my point of view it would make sense to use them for logging too. So my idea is to setup a serial-queue that is backed up by the OS thread-pool and post all logging items into that queue so that they get logged in order as they were reported.
Are there reasons that speak for having an extra thread for logging and not using the threads from the OS thread-pool?
I looked into the code of spdlog and it seems to me that the async_logger and the thread_pool are coupled tight together. Is my assumption correct that I have to re-write both or does someone sees a way to reuse one of them. Or would it even be better to just write a new Logger that implements the logging in the way that I have sketched out?
Many thanks!
Beta Was this translation helpful? Give feedback.
All reactions