summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2023-02-09 13:13:34 -0500
committerBrian Potchik <brian@vector35.com>2023-02-09 13:13:34 -0500
commit1230d1edcf09fa825985c204b115241141332a91 (patch)
tree209a42341b010fc52682abcc0dc19644f067f0dd /python
parentc88a003ef6ee32ced421263d17dd29a7e1455c35 (diff)
Update documentation to warn about creating databases in the context of analysis callbacks.
Diffstat (limited to 'python')
-rw-r--r--python/binaryview.py3
-rw-r--r--python/filemetadata.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 013cf984..8005630b 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -3317,6 +3317,8 @@ class BinaryView:
:return: True on success, False on failure
:rtype: bool
+ .. warning:: The calling thread must not hold a lock on the BinaryView instance as this action is run on the main thread which requires the lock.
+
:Example:
>>> settings = SaveSettings()
>>> bv.create_database(f"{bv.file.filename}.bndb", None, settings)
@@ -6300,6 +6302,7 @@ class BinaryView:
The callee of this function is not responsible for maintaining the lifetime of the returned AnalysisCompletionEvent object.
+ .. note:: The lock held by the callback thread on the BinaryView instance ensures that other BinaryView actions can be safely performed in the callback thread.
.. warning:: The built-in python console automatically updates analysis after every command is run, which means this call back may not behave as expected if entered interactively.
:param callback callback: A function to be called with no parameters when analysis has completed.
diff --git a/python/filemetadata.py b/python/filemetadata.py
index 2eab669a..5f59bcc7 100644
--- a/python/filemetadata.py
+++ b/python/filemetadata.py
@@ -426,6 +426,9 @@ class FileMetadata:
:param SaveSettings settings: optional argument for special save options.
:return: true on success, false on failure
:rtype: bool
+
+ .. warning:: The calling thread must not hold a lock on the BinaryView instance as this action is run on the main thread which requires the lock.
+
:Example:
>>> settings = SaveSettings()
>>> bv.file.create_database(f"{bv.file.filename}.bndb", None, settings)