src/common/modfactory.cpp
base::Scheduler* ModuleFactory::getScheduler()
{
    Locker lock(&m_lock);
    try
    {
        if (m_scheduler == NULL)
        {
            m_scheduler = new base::Scheduler();
        }
    }
    catch(const std::bad_alloc&)
    {
        throw klk::Exception(__FILE__, __LINE__, err::MEMORYALLOC);
    }

    return m_scheduler;
}
// Gets scheduler when it's necessary
// @note use it instead of m_scheduler direct usage
Gets scheduler when it's necessary
Gets scheduler when it ' s necessary
base::Scheduler* ModuleFactory::getScheduler()
{
    Locker lock(&m_lock);
    try
    {
        if (m_scheduler == NULL)
        {
            m_scheduler = new base::Scheduler();
        }
    }
    catch(const std::bad_alloc&)
    {
        throw klk::Exception(__FILE__, __LINE__, err::MEMORYALLOC);
    }
    return m_scheduler;
}
base :: Scheduler * ModuleFactory :: getScheduler ( ) { Locker lock ( & m_lock ) ; try { if ( m_scheduler == NULL ) { m_scheduler = new base :: Scheduler ( ) ; } } catch ( const std :: bad_alloc & ) { throw klk :: Exception ( __FILE__ , __LINE__ , err :: MEMORYALLOC ) ; } return m_scheduler ; }
Gets scheduler when it's necessary
Gets scheduler when it ' s necessary