| 336 | } |
| 337 | |
| 338 | void ComputingGraphImpl::ComputingSequence::attach_to_graph() { |
| 339 | auto gimpl = m_owner_graph; |
| 340 | if (gimpl->m_current_comp_seq) { |
| 341 | // remove previous handlers |
| 342 | auto prev_seq = static_cast<ComputingSequence*>(gimpl->m_current_comp_seq); |
| 343 | prev_seq->cleanup(); |
| 344 | } |
| 345 | #if !__DEPLOY_ON_XP_SP2__ |
| 346 | //! disable VarSanityCheck when __DEPLOY_ON_XP_SP2__=1. caused by |
| 347 | //! VarSanityCheck depends on std::thread |
| 348 | if (gimpl->options().var_sanity_check_first_run) { |
| 349 | m_var_sanity_check = std::make_unique<VarSanityCheck>(gimpl); |
| 350 | } |
| 351 | #endif |
| 352 | gimpl->m_current_comp_seq = this; |
| 353 | } |
| 354 | |
| 355 | ComputingGraphImpl::ComputingSequence::~ComputingSequence() { |
| 356 | MGB_TRY { cleanup(); } |