#NEWLINE# def _worker( self ) : #NEWLINE# #INDENT# 'worker method that is spawned in its own thread' #NEWLINE# while ( not self . _stopped ) : #NEWLINE# #INDENT# time_on = ( self . value * self . period ) #NEWLINE# time_off = ( ( 1 - self . value ) * self . period ) #NEWLINE# io . output ( self . pin_number , io . HIGH ) #NEWLINE# time . sleep ( time_on ) #NEWLINE# io . output ( self . pin_number , io . LOW ) #NEWLINE# time . sleep ( time_off ) #NEWLINE# #UNINDENT# return