Added function set_thread_on_domain

Initial commit