angr.analyses.decompiler.pattern_match.priority¶
Keeping the pattern analyses from starving other threads, a GUI’s in particular.
- angr.analyses.decompiler.pattern_match.priority.YIELD_INTERVAL = 0.02¶
seconds between two yields
- angr.analyses.decompiler.pattern_match.priority.YIELD_SLEEP = 0.001¶
how long a yield sleeps; a microsecond is too short for the OS to wake the GUI thread before this one takes the GIL back
- class angr.analyses.decompiler.pattern_match.priority.Checkpoint¶
Bases:
objectCalled from inside hot loops, as often as is convenient.
Every
freqcalls it looks at the clock, and at most once perintervalseconds it sleeps forsleepseconds to let other threads take the GIL, as the CFG’s low-priority mode does, and then runscallback. The callback may raise to abort the analysis; a UI uses that to cancel.- __init__(low_priority=True, callback=None, freq=1, interval=0.02, sleep=0.001)¶
- low_priority
- callback
- freq
- interval
- sleep