[Python-checkins] CVS: python/dist/src/Doc/lib libthreading.tex,1.11,1.11.14.1

Fred L. Drake fdrake@users.sourceforge.net
Tue, 19 Mar 2002 06:37:16 -0800


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

Modified Files:
      Tag: release22-maint
	libthreading.tex 
Log Message:
Adjust some poor wording in the text that explains what events are used
for (reported by Keith Briggs).
Wrap some very long lines.


Index: libthreading.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libthreading.tex,v
retrieving revision 1.11
retrieving revision 1.11.14.1
diff -C2 -d -r1.11 -r1.11.14.1
*** libthreading.tex	5 Sep 2001 13:44:54 -0000	1.11
--- libthreading.tex	19 Mar 2002 14:37:14 -0000	1.11.14.1
***************
*** 41,48 ****
  
  \begin{funcdesc}{Event}{}
! A factory function that returns a new event object.  An event
! manages a flag that can be set to true with the \method{set()} method and
! reset to false with the \method{clear()} method.  The \method{wait()} method blocks
! until the flag is true.
  \end{funcdesc}
  
--- 41,48 ----
  
  \begin{funcdesc}{Event}{}
! A factory function that returns a new event object.  An event manages
! a flag that can be set to true with the \method{set()} method and
! reset to false with the \method{clear()} method.  The \method{wait()}
! method blocks until the flag is true.
  \end{funcdesc}
  
***************
*** 80,84 ****
  
  \begin{classdesc*}{Thread}{}
! A class that represents a thread of control.  This class can be safely subclassed in a limited fashion.
  \end{classdesc*}
  
--- 80,85 ----
  
  \begin{classdesc*}{Thread}{}
! A class that represents a thread of control.  This class can be safely
! subclassed in a limited fashion.
  \end{classdesc*}
  
***************
*** 410,422 ****
  undetected.
  
  \subsection{Event Objects \label{event-objects}}
  
  This is one of the simplest mechanisms for communication between
! threads: one thread signals an event and one or more other threads
! are waiting for it.
  
  An event object manages an internal flag that can be set to true with
! the \method{set()} method and reset to false with the \method{clear()} method.  The
! \method{wait()} method blocks until the flag is true.
  
  
--- 411,423 ----
  undetected.
  
+ 
  \subsection{Event Objects \label{event-objects}}
  
  This is one of the simplest mechanisms for communication between
! threads: one thread signals an event and other threads wait for it.
  
  An event object manages an internal flag that can be set to true with
! the \method{set()} method and reset to false with the \method{clear()}
! method.  The \method{wait()} method blocks until the flag is true.
  
  
***************
*** 438,443 ****
  \begin{methoddesc}{clear}{}
  Reset the internal flag to false.
! Subsequently, threads calling \method{wait()} will block until \method{set()} is
! called to set the internal flag to true again.
  \end{methoddesc}
  
--- 439,444 ----
  \begin{methoddesc}{clear}{}
  Reset the internal flag to false.
! Subsequently, threads calling \method{wait()} will block until
! \method{set()} is called to set the internal flag to true again.
  \end{methoddesc}
  
***************
*** 543,550 ****
  
  You may override this method in a subclass.  The standard
! \method{run()} method invokes the callable object passed to the object's constructor as the
! \var{target} argument, if any, with sequential and keyword
! arguments taken from the \var{args} and \var{kwargs} arguments,
! respectively.
  \end{methoddesc}
  
--- 544,551 ----
  
  You may override this method in a subclass.  The standard
! \method{run()} method invokes the callable object passed to the
! object's constructor as the \var{target} argument, if any, with
! sequential and keyword arguments taken from the \var{args} and
! \var{kwargs} arguments, respectively.
  \end{methoddesc}
  
***************
*** 555,560 ****
  unhandled exception -- or until the optional timeout occurs.
  
! When the \var{timeout} argument is present and not \code{None}, it should
! be a floating point number specifying a timeout for the
  operation in seconds (or fractions thereof).
  
--- 556,561 ----
  unhandled exception -- or until the optional timeout occurs.
  
! When the \var{timeout} argument is present and not \code{None}, it
! should be a floating point number specifying a timeout for the
  operation in seconds (or fractions thereof).
  
***************
*** 604,616 ****
  \subsection{Timer Objects \label{timer-objects}}
  
! This class represents an action that should be run only after a certain amount
! of time has passed --- a timer. \class{Timer} is a subclass of \class{Thread} and
! as such also functions as an example of creating custom threads.
  
! Timers are started, as with threads, by calling their \method{start()} method. The
! timer can be stopped (before its action has begun) by calling the
! \method{cancel()} method. The interval the timer will wait before executing
! its action may not be exactly the same as the interval specified by the
! user.
  
  For example:
--- 605,618 ----
  \subsection{Timer Objects \label{timer-objects}}
  
! This class represents an action that should be run only after a
! certain amount of time has passed --- a timer.  \class{Timer} is a
! subclass of \class{Thread} and as such also functions as an example of
! creating custom threads.
  
! Timers are started, as with threads, by calling their \method{start()}
! method.  The timer can be stopped (before its action has begun) by
! calling the \method{cancel()} method.  The interval the timer will
! wait before executing its action may not be exactly the same as the
! interval specified by the user.
  
  For example:
***************
*** 629,633 ****
  
  \begin{methoddesc}{cancel}{}
! Stop the timer, and cancel the execution of the timer's action. This will only
! work if the timer is still in its waiting stage.
  \end{methoddesc}
--- 631,635 ----
  
  \begin{methoddesc}{cancel}{}
! Stop the timer, and cancel the execution of the timer's action.  This
! will only work if the timer is still in its waiting stage.
  \end{methoddesc}