summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2017-07-14 14:00:46 -0400
committerBrian Potchik <brian@vector35.com>2017-07-14 14:00:46 -0400
commitfcd3be2d973e9ecc9bbc95425cb2e1a261a3f18a (patch)
tree4ddcbaf43f560bd50004abb0a795d97f82eb4193 /python
parentbb15b09b7888d238ab78d249fdf0e0c29999d9df (diff)
Update Python to use BNUpdateAnalysisAndWait
Diffstat (limited to 'python')
-rw-r--r--python/binaryview.py24
1 files changed, 1 insertions, 23 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 82c9b727..3242b89c 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -1821,29 +1821,7 @@ class BinaryView(object):
:rtype: None
"""
- class WaitEvent(object):
- def __init__(self):
- self.cond = threading.Condition()
- self.done = False
-
- def complete(self):
- self.cond.acquire()
- self.done = True
- self.cond.notify()
- self.cond.release()
-
- def wait(self):
- self.cond.acquire()
- while not self.done:
- self.cond.wait()
- self.cond.release()
-
- wait = WaitEvent()
- # TODO: figure out if we actually need this 'event' variable, likely we do
- event = AnalysisCompletionEvent(self, lambda: wait.complete())
- core.BNUpdateAnalysis(self.handle)
- wait.wait()
- del event # Get rid of unused variable warning
+ core.BNUpdateAnalysisAndWait(self.handle)
def abort_analysis(self):
"""