model: index thread_map by int, not thread_id_t