Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f233b0c4
Commit
f233b0c4
authored
Jan 15, 2008
by
Skip Montanaro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better (?) text describing the lack of guarantees provided by qsize(),
empty() and full().
parent
d4c2e865
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
Doc/library/queue.rst
Doc/library/queue.rst
+11
-6
No files found.
Doc/library/queue.rst
View file @
f233b0c4
...
...
@@ -49,20 +49,25 @@ See the source code for details. The public methods are:
.. method:: Queue.qsize()
Return the approximate size of the queue. Because of multithreading semantics,
this number is not reliable.
Return the approximate size of the queue. qsize() > 0 doesn't guarantee
that a subsequent get() will not block, nor that qsize() < maxsize
guarantee that put() will not block.
.. method:: Queue.empty()
Return ``True`` if the queue is empty, ``False`` otherwise. Because of
multithreading semantics, this is not reliable.
Return ``True`` if the queue is empty, ``False`` otherwise. If empty()
returns ``True`` it doesn't guarantee that a subsequent call to put()
will not block. Similarly, if empty() returns ``False`` it doesn't
guarantee that a subsequent call to get() will not block.
.. method:: Queue.full()
Return ``True`` if the queue is full, ``False`` otherwise. Because of
multithreading semantics, this is not reliable.
Return ``True`` if the queue is full, ``False`` otherwise. If full()
returns ``True`` it doesn't guarantee that a subsequent call to get()
will not block. Similarly, if full() returns ``False`` it doesn't
guarantee that a subsequent call to put() will not block.
.. method:: Queue.put(item[, block[, timeout]])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment