Abstract out the thread_options structure