def call_runtime(self):
        '''
        Execute the runtime
        '''
        cache = self.gather_cache()
        chunks = self.get_chunks()
        interval = self.opts['thorium_interval']
        recompile = self.opts.get('thorium_recompile', 300)
        r_start = time.time()
        while True:
            events = self.get_events()
            if not events:
                time.sleep(interval)
                continue
            start = time.time()
            self.state.inject_globals['__events__'] = events
            self.state.call_chunks(chunks)
            elapsed = time.time() - start
            left = interval - elapsed
            if left > 0:
                time.sleep(left)
            self.state.reset_run_num()
            if (start - r_start) > recompile:
                cache = self.gather_cache()
                chunks = self.get_chunks()
                if self.reg_ret is not None:
                    self.returners['{0}.save_reg'.format(self.reg_ret)](chunks)
                r_start = time.time()
def call_runtime ( self ) : cache = self . gather_cache ( ) chunks = self . get_chunks ( ) interval = self . opts [ 'thorium_interval' ] recompile = self . opts . get ( 'thorium_recompile' , 300 ) r_start = time . time ( ) while True : events = self . get_events ( ) if not events : time . sleep ( interval ) continue start = time . time ( ) self . state . inject_globals [ '__events__' ] = events self . state . call_chunks ( chunks ) elapsed = time . time ( ) - start left = interval - elapsed if left > 0 : time . sleep ( left ) self . state . reset_run_num ( ) if ( start - r_start ) > recompile : cache = self . gather_cache ( ) chunks = self . get_chunks ( ) if self . reg_ret is not None : self . returners [ '{0}.save_reg' . format ( self . reg_ret ) ] ( chunks ) r_start = time . time ( )
Execute the runtime