Back to index

moin  1.9.0~rc2
Classes | Functions | Variables
MoinMoin.util.thread_monitor Namespace Reference

Classes

class  AbstractMonitor
class  LegacyMonitor
class  DirectMonitor

Functions

def dump_regularly

Variables

string __all__ = "activate_hook trigger_dump dump_regularly"
tuple mon = DirectMonitor()
 activate_hook = mon.activate_hook
 trigger_dump = mon.trigger_dump
 hook_enabled = mon.hook_enabled

Function Documentation

Dumps the tracebacks every 'seconds' seconds. 

Definition at line 116 of file thread_monitor.py.

00116 
00117 def dump_regularly(seconds):
00118     """ Dumps the tracebacks every 'seconds' seconds. """
00119     activate_hook()
00120 
00121     def background_dumper(seconds):
00122         while 1:
00123             sleep(seconds)
00124             trigger_dump()
00125 
00126     threading.Thread(target=background_dumper, args=(seconds, )).start()
00127 
00128 
# Python 2.5 provides an optimised version

Variable Documentation

Definition at line 17 of file thread_monitor.py.

Definition at line 134 of file thread_monitor.py.

Definition at line 136 of file thread_monitor.py.

Definition at line 130 of file thread_monitor.py.

Definition at line 135 of file thread_monitor.py.