[Python-checkins] python/dist/src/Doc/lib libqueue.tex,1.12,1.13

loewis@users.sourceforge.net loewis@users.sourceforge.net
Tue, 15 Oct 2002 08:11:15 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv14777/Doc/lib

Modified Files:
	libqueue.tex 
Log Message:
Patch #572628: Optional timeouts for put and get.


Index: libqueue.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libqueue.tex,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** libqueue.tex	26 Jun 2002 05:22:08 -0000	1.12
--- libqueue.tex	15 Oct 2002 15:11:13 -0000	1.13
***************
*** 55,88 ****
  
  \begin{methoddesc}{empty}{}
! Return \code{1} if the queue is empty, \code{0} otherwise.  Because
! of multithreading semantics, this is not reliable.
  \end{methoddesc}
  
  \begin{methoddesc}{full}{}
! Return \code{1} if the queue is full, \code{0} otherwise.  Because of
! multithreading semantics, this is not reliable.
  \end{methoddesc}
  
! \begin{methoddesc}{put}{item\optional{, block}}
! Put \var{item} into the queue.  If optional argument \var{block} is 1
! (the default), block if necessary until a free slot is available.
! Otherwise (\var{block} is 0), put \var{item} on the queue if a free
  slot is immediately available, else raise the \exception{Full}
! exception.
  \end{methoddesc}
  
  \begin{methoddesc}{put_nowait}{item}
! Equivalent to \code{put(\var{item}, 0)}.
  \end{methoddesc}
  
! \begin{methoddesc}{get}{\optional{block}}
! Remove and return an item from the queue.  If optional argument
! \var{block} is 1 (the default), block if necessary until an item is
! available.  Otherwise (\var{block} is 0), return an item if one is
! immediately available, else raise the
! \exception{Empty} exception.
  \end{methoddesc}
  
  \begin{methoddesc}{get_nowait}{}
! Equivalent to \code{get(0)}.
  \end{methoddesc}
--- 55,100 ----
  
  \begin{methoddesc}{empty}{}
! Return \code{True} if the queue is empty, \code{False} otherwise.
! Becauseof multithreading semantics, this is not reliable.
  \end{methoddesc}
  
  \begin{methoddesc}{full}{}
! Return \code{True} if the queue is full, \code{False} otherwise.
! Because of multithreading semantics, this is not reliable.
  \end{methoddesc}
  
! \begin{methoddesc}{put}{item\optional{, block\optional{, timeout}}}
! Put \var{item} into the queue. If optional args \var{block} is true
! and \var{timeout} is None (the default), block if necessary until a
! free slot is available. If \var{timeout} is a positive number, it
! blocks at most \var{timeout} seconds and raises the \exception{Full}
! exception if no free slot was available within that time.
! Otherwise (\var{block} is false), put an item on the queue if a free
  slot is immediately available, else raise the \exception{Full}
! exception (\var{timeout} is ignored in that case).
! 
! \versionadded[the timeout parameter]{2.3}
! 
  \end{methoddesc}
  
  \begin{methoddesc}{put_nowait}{item}
! Equivalent to \code{put(\var{item}, False)}.
  \end{methoddesc}
  
! \begin{methoddesc}{get}{\optional{block\optional{, timeout}}}
! Remove and return an item from the queue. If optional args
! \var{block} is true and \var{timeout} is None (the default),
! block if necessary until an item is available. If \var{timeout} is
! a positive number, it blocks at most \var{timeout} seconds and raises
! the \exception{Empty} exception if no item was available within that
! time. Otherwise (\var{block} is false), return an item if one is
! immediately available, else raise the \exception{Empty} exception
! (\var{timeout} is ignored in that case).
! 
! \versionadded[the timeout parameter]{2.3}
! 
  \end{methoddesc}
  
  \begin{methoddesc}{get_nowait}{}
! Equivalent to \code{get(False)}.
  \end{methoddesc}