Implemented iothread_perform_on_main() to support background threads
scheduling work on main thread