Example #1
0
bool Config::_updateNodes( const bool canFail )
{
    ConfigUpdateVisitor update( _initID, _currentFrame );
    accept( update );

    ConfigUpdateSyncVisitor syncUpdate;
    accept( syncUpdate );

    const bool failure = syncUpdate.hadFailure();

    if( syncUpdate.needsSync( )) // init failure, call again (exit pending)
    {
        LBASSERT( failure );
        accept( syncUpdate );
        LBASSERT( !syncUpdate.needsSync( ));
    }

    if( syncUpdate.getNumRunningChannels() == 0 && !canFail )
    {
        LBWARN << "Config has no running channels, will exit" << std::endl;
        return false;
    }

    return !failure;
}
Example #2
0
bool Config::_updateNodes()
{
    ConfigUpdateVisitor update( _initID, _currentFrame );
    accept( update );

    ConfigUpdateSyncVisitor syncUpdate;
    accept( syncUpdate );

    const bool result = syncUpdate.getResult();
    if( !result )
        setError( syncUpdate.getError( ));

    if( syncUpdate.needsSync( )) // init failure, call again (exit pending)
    {
        EQASSERT( !result );
        accept( syncUpdate );
        if( !syncUpdate.getResult( ))
            setError( syncUpdate.getError( ));
        EQASSERT( !syncUpdate.needsSync( ));
    }

    return result;
}