Package rrlog :: Package contrib :: Module mail :: Class Spooler
[hide private]
[frames] | no frames]

Class Spooler

source code

object --+
         |
        Spooler

Instance Methods [hide private]
 
__init__(self, mailer, buffer, pauseSecs=10, autostop=False)
Starts a worker thread which reads buffered lines and sends them when their time has come.
source code
 
_i_am_orphan(self) source code
 
_work(self) source code
 
run(self) source code
 
stop(self)
Sets my stop flag, causing the worker thread to finish after its next working interval.
source code
 
is_active(self) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, mailer, buffer, pauseSecs=10, autostop=False)
(Constructor)

source code 

Starts a worker thread which reads buffered lines and sends them when their time has come.

Parameters:
  • autostop - When True, the worker thread will check the number of non-daemon threads after each work interval. When only one (itself) is left, it stops automatically. But when there are more threads doing the same trick, explicit stop is required.
Overrides: object.__init__

stop(self)

source code 

Sets my stop flag, causing the worker thread to finish after its next working interval. (All remaining buffered lines are sent before exit.)