(self)
Compute new samples.
Compute new samples.
Compute new samples .
def sample(self):
        """
        Compute new samples.
        """
        self._sampling = True
        self._runSampleEvent.set()
        while not self._sampleCompleteEvent.wait(timeout=float(self._timeout_duration)):
            if not self._sampler_thread.is_alive():
                raise Exception("The sampler thread terminated unexpectedly")
        self._sampleCompleteEvent.clear()
        self._sampling = False
def sample ( self ) : self . _sampling = True self . _runSampleEvent . set ( ) while not self . _sampleCompleteEvent . wait ( timeout = float ( self . _timeout_duration ) ) : if not self . _sampler_thread . is_alive ( ) : raise Exception ( "The sampler thread terminated unexpectedly" ) self . _sampleCompleteEvent . clear ( ) self . _sampling = False