I have some method doA() that occasionally hangs for a while. Are there any common modules in Python that can control time of doA() execution and interrupt it? Of course, it may be implemented via threads, so simple wrapper around threading module may be good solution.
In other words i'd like to have code like:
import CoolAsyncControl
CoolAsyncControl.call(self.doA, timeout = 10)