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 with set_worker_thread_count.

is_main_thread()[source]
set_worker_thread_count(count)[source]

The set_worker_thread_count function sets the number of worker threads that are currently running. By default, this is the number of cores on the system minus one.

worker_enqueue(func, name='')[source]
worker_interactive_enqueue(func, name='')[source]
worker_priority_enqueue(func, name='')[source]