get thread_id as int