MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / execute_on_main_thread

Function execute_on_main_thread

python/mainthread.py:62–73  ·  view source on GitHub ↗

The ``execute_on_main_thread`` function takes a single parameter which is a function that will be executed on the main Binary Ninja thread. .. warning:: May be required for some GUI operations, but should be used sparingly as it can block the UI.

(func)

Source from the content-addressed store, hash-verified

60
61
62def execute_on_main_thread(func):
63 """
64 The ``execute_on_main_thread`` function takes a single parameter which is a function that will be executed
65 on the main Binary Ninja thread.
66
67 .. warning:: May be required for some GUI operations, but should be used sparingly as it can block the UI.
68 """
69 action = scriptingprovider._ThreadActionContext(func)
70 obj = core.BNExecuteOnMainThread(0, action.callback)
71 if obj:
72 return plugin.MainThreadAction(obj)
73 return None
74
75
76def execute_on_main_thread_and_wait(func):

Callers 2

connect_vscode_debuggerFunction · 0.70
custom_tooltip.pyFile · 0.50

Calls 1

MainThreadActionMethod · 0.80

Tested by

no test coverage detected