genesis-3d_engine/Engine/foundation/jobs/tp/tpjobsystem.cc
zhongdaohuan 6e8fbca745 genesis-3d engine version 1.3.
match the genesis editor version 1.3.0.653.
2014-05-05 14:50:33 +08:00

56 lines
1.1 KiB
C++

//------------------------------------------------------------------------------
// tpjobsystem.cc
// (C) 2009 Radon Labs GmbH
//------------------------------------------------------------------------------
#include "stdneb.h"
#include "jobs/tp/tpjobsystem.h"
namespace Jobs
{
__ImplementClass(Jobs::TPJobSystem, 'TPJS', Base::JobSystemBase);
using namespace Base;
//------------------------------------------------------------------------------
/**
*/
TPJobSystem::TPJobSystem()
{
// empty
}
//------------------------------------------------------------------------------
/**
*/
TPJobSystem::~TPJobSystem()
{
if (this->IsValid())
{
this->Discard();
}
}
//------------------------------------------------------------------------------
/**
*/
void
TPJobSystem::Setup()
{
n_assert(!this->IsValid());
JobSystemBase::Setup();
this->threadPool.Setup();
}
//------------------------------------------------------------------------------
/**
*/
void
TPJobSystem::Discard()
{
n_assert(this->IsValid());
this->threadPool.Discard();
JobSystemBase::Discard();
}
} // namespace Jobs