be sure to initialize the thread_ids dictionary for the single user case