py_main_thread_func function

Deprecated Create a Python function that will always be called on the main thread