code: def run(self):
          
          while not self.stopEvent.isSet():
              try:
                  # no need to monitor if no observers
                  if 0 < self.observable.countObservers():
                      currentReaders = self.readerProc()
                      addedReaders = []
                      removedReaders = []
  
                      if currentReaders != self.readers:
                          for reader in currentReaders:
                              if reader not in self.readers:
                                  addedReaders.append(reader)
                          for reader in self.readers:
                              if reader not in currentReaders:
                                  removedReaders.append(reader)
  
                          if addedReaders or removedReaders:
                              # Notify observers
                              self.readers = []
                              for r in currentReaders:
                                  self.readers.append(r)
                              self.observable.setChanged()
                              self.observable.notifyObservers((addedReaders,
                                                              removedReaders))
  
                  # wait every second on stopEvent
                  self.stopEvent.wait(self.period)
  
              except Exception:
                  # FIXME Tighten the exceptions caught by this block
                  traceback.print_exc()
                  # Most likely raised during interpreter shutdown due
                  # to unclean exit which failed to remove all observers.
                  # To solve this, we set the stop event and pass the
                  # exception to let the thread finish gracefully.
                  self.stopEvent.set()
docs: Runs until stopEvent is notified, and notify
          observers of all reader insertion/removal.