genesis-3d_engine/Engine/foundation/jobs/tp/tpjobsystem.h
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

50 lines
1.1 KiB
Objective-C

#pragma once
//------------------------------------------------------------------------------
/**
@class Jobs::TPJobSystem
Implementation of JobSystem for jobs running in a CPU thread pool.
(C) 2009 Radon Labs GmbH
*/
#include "jobs/base/jobsystembase.h"
#include "jobs/tp/tpjobthreadpool.h"
//------------------------------------------------------------------------------
namespace Jobs
{
class TPJobSystem : public Base::JobSystemBase
{
__DeclareClass(TPJobSystem);
public:
/// constructor
TPJobSystem();
/// destructor
virtual ~TPJobSystem();
/// setup the job system
void Setup();
/// shutdown the job system
void Discard();
private:
friend class TPJobPort;
/// get pointer to thread pool
TPJobThreadPool* GetThreadPool();
TPJobThreadPool threadPool;
};
//------------------------------------------------------------------------------
/**
*/
inline TPJobThreadPool*
TPJobSystem::GetThreadPool()
{
return &(this->threadPool);
}
} // namespace Jobs
//------------------------------------------------------------------------------