[issue12767] document threading.Condition.notify
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 63a24bff6f36 by Eli Bendersky in branch '3.2': Issue #12767: documenting threading.Condition.notify http://hg.python.org/cpython/rev/63a24bff6f36 New changeset ac12dcea69e1 by Eli Bendersky in branch 'default': Issue 12767: document the argument of threading.Condition.notify http://hg.python.org/cpython/rev/ac12dcea69e1 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12767 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12767] document threading.Condition.notify
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 63a00d019bb2 by Eli Bendersky in branch '2.7': Closes issue 12767: document the argument of threading.Condition.notify http://hg.python.org/cpython/rev/63a00d019bb2 -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12767 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12767] document threading.Condition.notify
Eli Bendersky eli...@gmail.com added the comment: I propose the attached patch for the documentation. Any objections? -- keywords: +patch Added file: http://bugs.python.org/file23657/issue12767.1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12767 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12767] document threading.Condition.notify
Ezio Melotti ezio.melo...@gmail.com added the comment: + This method wakes up at most *n* of the threads + The current implementation wakes up exactly *n* threads + A future, optimized implementation may occasionally wake up more than + one thread. Isn't this a bit contradictory? -- nosy: +ezio.melotti stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12767 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12767] document threading.Condition.notify
Eli Bendersky eli...@gmail.com added the comment: Ezio, thanks for the catch. I missed that one. Attaching a new, fixed patch. -- Added file: http://bugs.python.org/file23658/issue12767.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12767 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12767] document threading.Condition.notify
Graeme Cross gjcr...@gmail.com added the comment: I have added documentation for the 'n' parameter of threading.Condition.notify as part of the overhaul of the threading module's docstrings. Reference: #12768 -- nosy: +gjcross ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12767 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12767] document threading.Condition.notify
Antoine Pitrou pit...@free.fr added the comment: I asked the user who reported this documentation omission what he's using the 'n' argument for. His reply: Yes I am using the n parameter, it is mainly to implement a subclass of Queue that supports bulk get and put operations. This enhances the performance of repeated get/put calls when the Queue is created using multiprocessing.Manager. I think it's fine to document it. It's been there for a long time. Besides, if we know how to notify one thread, we are certainly able to notify n of them :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12767 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12767] document threading.Condition.notify
Eli Bendersky eli...@gmail.com added the comment: David, while you make a valid point, consider that 'n' is part of the public API of the threading module (although not documented) and it's conceivable that there is existing code in the wild using it. To do what you suggest we should maybe go through a normal deprecation process for this argument first? Adding Antoine as the listed threading expert. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12767 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12767] document threading.Condition.notify
R. David Murray rdmur...@bitdance.com added the comment: Good point. Probably, then, we should just put a comment in the code that 'n' is an internal implementation detail and leave it at that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12767 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12767] document threading.Condition.notify
Eli Bendersky eli...@gmail.com added the comment: I asked the user who reported this documentation omission what he's using the 'n' argument for. His reply: Yes I am using the n parameter, it is mainly to implement a subclass of Queue that supports bulk get and put operations. This enhances the performance of repeated get/put calls when the Queue is created using multiprocessing.Manager. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12767 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12767] document threading.Condition.notify
New submission from Eli Bendersky eli...@gmail.com: User report (Jiachang Xu) from the docs mailing list: The theading.Condition.notify method has a parameter - n, which isn't documented in the the documentation of the threading module. 1. The parameter should be documented 2. notify() is mentioned multiple times in the docs of threading - perhaps the parameter should be mentioned in more than one place as well 3. The parameter should also be documented in the doc-string of notify in Lib/theading.py - however, this may be a separate issue since currently none of the methods of Condition has docstrings. -- assignee: docs@python components: Documentation keywords: easy messages: 142246 nosy: docs@python, eli.bendersky priority: normal severity: normal stage: needs patch status: open title: document threading.Condition.notify type: behavior versions: Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12767 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12767] document threading.Condition.notify
Eli Bendersky eli...@gmail.com added the comment: Opened Issue 12768 on the general lack of docstrings in the threading module -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12767 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com