mainthread module¶
- execute_on_main_thread(func)[source]¶
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.
- execute_on_main_thread_and_wait(func)[source]¶
The
execute_on_main_thread
function takes a single parameter which is a function that will be executed on the main Binary Ninja thread and will block execution of further python until the function returns.Warning
May be required for some GUI operations, but should be used sparingly as it can block the UI.
- get_worker_thread_count()[source]¶
The
get_worker_thread_count
function returns the number of worker threads that are currently running. By default, this is the number of cores on the system minus one, however this can be changed withset_worker_thread_count
.