comparison Doc/libqueue.tex @ 7277:bf4e790bd61a legacy-trunk

Remove all \bcode / \ecode cruft; this is no longer needed. See previous checkin of myformat.sty. Change "\renewcommand{\indexsubitem}{(...)}" to "\setindexsubitem{(...)}" everywhere. Some other minor nits that I happened to come across.
author Fred Drake <fdrake@acm.org>
date Fri, 13 Feb 1998 06:58:54 +0000
parents 2522c8f8615b
children 3d1590b5e3dd
comparison
equal deleted inserted replaced
7276:39de49434df4 7277:bf4e790bd61a
16 semantics. It depends on the availability of thread support in 16 semantics. It depends on the availability of thread support in
17 Python. 17 Python.
18 18
19 The \code{Queue} module defines the following exception: 19 The \code{Queue} module defines the following exception:
20 20
21 \renewcommand{\indexsubitem}{(in module Queue)} 21 \setindexsubitem{(in module Queue)}
22 22
23 \begin{excdesc}{Empty} 23 \begin{excdesc}{Empty}
24 Exception raised when non-blocking get (e.g. \code{get_nowait()}) is 24 Exception raised when non-blocking get (e.g. \code{get_nowait()}) is
25 called on a Queue object which is empty, or for which the emptyiness 25 called on a Queue object which is empty, or for which the emptyiness
26 cannot be determined (i.e. because the appropriate locks cannot be 26 cannot be determined (i.e. because the appropriate locks cannot be
33 described below. This class can be derived from in order to implement 33 described below. This class can be derived from in order to implement
34 other queue organizations (e.g. stack) but the inheritable interface 34 other queue organizations (e.g. stack) but the inheritable interface
35 is not described here. See the source code for details. The public 35 is not described here. See the source code for details. The public
36 interface methods are: 36 interface methods are:
37 37
38 \renewcommand{\indexsubitem}{(__init__ method)} 38 \setindexsubitem{(__init__ method)}
39 39
40 \begin{funcdesc}{__init__}{maxsize} 40 \begin{funcdesc}{__init__}{maxsize}
41 Constructor for the class. \var{maxsize} is an integer that sets the 41 Constructor for the class. \var{maxsize} is an integer that sets the
42 upperbound limit on the number of items that can be placed in the 42 upperbound limit on the number of items that can be placed in the
43 queue. Insertion will block once this size has been reached, until 43 queue. Insertion will block once this size has been reached, until
44 queue items are consumed. If \var{maxsize} is less than or equal to 44 queue items are consumed. If \var{maxsize} is less than or equal to
45 zero, the queue size is infinite. 45 zero, the queue size is infinite.
46 \end{funcdesc} 46 \end{funcdesc}
47 47
48 \renewcommand{\indexsubitem}{(qsize method)} 48 \setindexsubitem{(qsize method)}
49 49
50 \begin{funcdesc}{qsize}{} 50 \begin{funcdesc}{qsize}{}
51 Returns the approximate size of the queue. Because of multithreading 51 Returns the approximate size of the queue. Because of multithreading
52 semantics, this number is not reliable. 52 semantics, this number is not reliable.
53 \end{funcdesc} 53 \end{funcdesc}
54 54
55 \renewcommand{\indexsubitem}{(empty method)} 55 \setindexsubitem{(empty method)}
56 56
57 \begin{funcdesc}{empty}{} 57 \begin{funcdesc}{empty}{}
58 Returns 1 if the queue is empty, 0 otherwise. Because of 58 Returns 1 if the queue is empty, 0 otherwise. Because of
59 multithreading semantics, this is not reliable. 59 multithreading semantics, this is not reliable.
60 \end{funcdesc} 60 \end{funcdesc}
61 61
62 \renewcommand{\indexsubitem}{(full method)} 62 \setindexsubitem{(full method)}
63 63
64 \begin{funcdesc}{full}{} 64 \begin{funcdesc}{full}{}
65 Returns 1 if the queue is full, 0 otherwise. Because of 65 Returns 1 if the queue is full, 0 otherwise. Because of
66 multithreading semantics, this is not reliable. 66 multithreading semantics, this is not reliable.
67 \end{funcdesc} 67 \end{funcdesc}
68 68
69 \renewcommand{\indexsubitem}{(put method)} 69 \setindexsubitem{(put method)}
70 70
71 \begin{funcdesc}{put}{item} 71 \begin{funcdesc}{put}{item}
72 Puts \var{item} into the queue. 72 Puts \var{item} into the queue.
73 \end{funcdesc} 73 \end{funcdesc}
74 74
75 \renewcommand{\indexsubitem}{(get method)} 75 \setindexsubitem{(get method)}
76 76
77 \begin{funcdesc}{get}{} 77 \begin{funcdesc}{get}{}
78 Gets and returns an item from the queue, blocking if necessary until 78 Gets and returns an item from the queue, blocking if necessary until
79 one is available. 79 one is available.
80 \end{funcdesc} 80 \end{funcdesc}
81 81
82 \renewcommand{\indexsubitem}{(get_nowait method)} 82 \setindexsubitem{(get_nowait method)}
83 83
84 \begin{funcdesc}{get_nowait}{} 84 \begin{funcdesc}{get_nowait}{}
85 Gets and returns an item from the queue if one is immediately 85 Gets and returns an item from the queue if one is immediately
86 available. Raises an \code{Empty} exception if the queue is empty or 86 available. Raises an \code{Empty} exception if the queue is empty or
87 if the queue's emptiness cannot be determined. 87 if the queue's emptiness cannot be determined.