#NEWLINE# def start( self ) : #NEWLINE# #INDENT# 'Start our callback in its own background thread.' #NEWLINE# if ( self . frequency > 0 ) : #NEWLINE# #INDENT# threadname = ( self . name or self . __class__ . __name__ ) #NEWLINE# if ( self . thread is None ) : #NEWLINE# #INDENT# self . thread = BackgroundTask ( self . frequency , self . callback , bus = self . bus ) #NEWLINE# self . thread . setName ( threadname ) #NEWLINE# self . thread . start ( ) #NEWLINE# self . bus . log ( ( 'Started monitor thread %r.' % threadname ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . bus . log ( ( 'Monitor thread %r already started.' % threadname ) )