#NEWLINE# def removeObserver( self , observer ) : #NEWLINE# #INDENT# '\n        Removes an observer.\n\n        @param observer: Previously added observer\n        ' #NEWLINE# with self . _lock : #NEWLINE# #INDENT# self . _weak_observers . remove ( weakref . ref ( self ) ) #NEWLINE# if ( len ( self . _weak_observers ) == 0 ) : #NEWLINE# #INDENT# self . stopThread ( )