Skip to content

Does the compression task block the main thread? #243

Closed
@mahadi

Description

Hi, i have a program running with several threads. Each of them is using queues to buffer its work load while another thread is running. In the main thread my main engine runs and uses the queues to distribute and forward work. Also in the main module the logger is configured with a custom log rotation function. (See #241).

I am monitoring the queue loads and i can see that during the time when log compression happens (after 1 GiB with bz2 - takes ~ 2.5 minutes) my queues only fill up but can not be worked on in my main thread during that time.

So i thought about putting my engine also in a separate thread. But actually logging should be the part which runs in a separate thread.

Can you tell me how this is managed in loguru?
Does the log processing run in a separate thread?

I guess the problem is related to the compression itself. It is running synchronosly...

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementImprovement to an already existing featurequestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions