Working next_thread_to_run, locks still broken