model: refactor check_current_action, next thread computation