def refresh_signal_handler(self, signo, frame):
if signo != signal.SIGUSR1:<EOL><INDENT>return<EOL><DEDENT>for module in self.modules:<EOL><INDENT>if hasattr(module, "<STR_LIT>"):<EOL><INDENT>if module.interval > self.treshold_interval:<EOL><INDENT>thread = Thread(target=module.run)<EOL>thread.start()<EOL><DEDENT>else:<EOL><INDENT>module.run()<EOL><DEDENT><DEDENT>else:<EOL><INDENT>module.run()<EOL><DEDENT><DEDENT>self.async_refresh()<EOL>
This callback is called when SIGUSR1 signal is received.

It updates outputs of all modules by calling their `run` method.

Interval modules are updated in separate threads if their interval is
above a certain treshold value.
This treshold is computed by :func:`compute_treshold_interval` class
method.
The reasoning is that modules with larger intervals also usually take
longer to refresh their output and that their output is not required in
'real time'.
This also prevents possible lag when updating all modules in a row.