This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Logging Cookbook ambiguity
Type: enhancement Stage:
Components: Documentation Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: bluebloodpole, docs@python, rhettinger
Priority: normal Keywords:

Created on 2021-04-17 01:18 by bluebloodpole, last changed 2022-04-11 14:59 by admin.

Messages (4)
msg391267 - (view) Author: Gene Ratzlaff (bluebloodpole) Date: 2021-04-17 01:18
In the section titled "Logging to a single file from multiple processes"
I am puzzled by the second example, as follows:
The first example has the listener/logger is in a separate >process< and the listener/logger process is (as I would anticipate) started >before< the worker/sender processes. 
In the 2nd example, the listener/logger is in a separate >thread< and the listener/logger thread is (oddly) started >after< the worker/sender processes.
Please correct it, or explain in the Cookbook what is OK about doing it that way, and if it is OK, are there limitations to doing it that way?
msg391325 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2021-04-18 06:20
The multiprocessing.Queue() instance will accumulate messages regardless of whether a producer or consumer is started first.
msg391486 - (view) Author: Gene Ratzlaff (bluebloodpole) Date: 2021-04-21 00:33
Agreed, but only to the limits of the buffer - that's what I was getting at when I suggested that limitations should be explained.
msg391651 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2021-04-23 04:41
The queue isn't being used with a maxsize.
History
Date User Action Args
2022-04-11 14:59:44adminsetgithub: 88043
2021-04-23 04:41:11rhettingersetnosy: - vinay.sajip
messages: + msg391651
2021-04-21 00:33:25bluebloodpolesetmessages: + msg391486
2021-04-18 06:20:02rhettingersetnosy: + rhettinger
messages: + msg391325
2021-04-17 03:35:22ned.deilysetnosy: + vinay.sajip
2021-04-17 01:18:08bluebloodpolecreate