Skip to content

Commit 89d59ba

Browse files
committed
Update the README.rst with circular queue mode info and disclaimer.
1 parent 7f02aaa commit 89d59ba

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,18 @@ or for the python logging interface:
348348
sure the communication thread terminates and it's joined correctly. Otherwise the program won't exit, waiting for
349349
the thread, unless forcibly killed.
350350

351+
#### Circular queue mode
352+
353+
In some applications it can be especially important to guarantee that the logging process won't block under *any*
354+
circumstance, even when it's logging faster than the sending thread could handle (_backpressure_). In this case it's
355+
possible to enable the `circular queue` mode, by passing `True` in the `queue_circular` parameter of
356+
``asyncsender.FluentSender``. By doing so the thread doing the logging won't block even when the queue is full, the
357+
new event will be added to the queue by discarding the oldest one.
358+
359+
**WARNING**: setting `queue_circular` to `True` will cause loss of events if the queue fills up completely! Make sure
360+
that this doesn't happen, or it's acceptable for your application.
361+
362+
351363
Testing
352364
-------
353365

0 commit comments

Comments
 (0)