Skip to content

Commit

Permalink
Fix CreateThreadPool
Browse files Browse the repository at this point in the history
  • Loading branch information
exstrim401 committed Nov 20, 2022
1 parent 54d76a1 commit d8580d5
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion engine/host_saverestore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3286,7 +3286,7 @@ void CSaveRestore::Init( void )
threadPoolStartParams.bUseAffinityTable = true;
}

g_pSaveThread = CreateThreadPool1();
g_pSaveThread = CreateThreadPool();
g_pSaveThread->Start( threadPoolStartParams, "SaveJob" );
}

Expand Down
2 changes: 1 addition & 1 deletion engine/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ def build(bld):
elif bld.env.DEST_OS == 'win32':
libs += ['USER32', 'WINMM', 'WININET', 'DSOUND', 'DXGUID', 'GDI32', 'bzip2']
elif bld.env.DEST_OS == 'darwin':
libs += ['COREAUDIO', 'AUDIOTOOLBOX', 'SYSTEMCONFIGURATION']
libs += ['APPKIT', 'COREAUDIO', 'AUDIOTOOLBOX', 'SYSTEMCONFIGURATION']

install_path = bld.env.LIBDIR

Expand Down
2 changes: 1 addition & 1 deletion filesystem/filesystem_async.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ void CBaseFileSystem::InitAsync()
if ( VCRGetMode() == VCR_Disabled )
{
// create the i/o thread pool
m_pThreadPool = CreateThreadPool1();
m_pThreadPool = CreateThreadPool();

ThreadPoolStartParams_t params;
params.iThreadPriority = 0;
Expand Down
2 changes: 1 addition & 1 deletion game/client/particlemgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ bool CParticleMgr::Init(unsigned long count, IMaterialSystem *pMaterials)
if ( IsX360() )
{
//m_pThreadPool[0] = CreateThreadPool();
m_pThreadPool[1] = CreateThreadPool1();
m_pThreadPool[1] = CreateThreadPool();

ThreadPoolStartParams_t startParams;
startParams.nThreads = 3;
Expand Down
2 changes: 1 addition & 1 deletion materialsystem/cmaterialsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3567,7 +3567,7 @@ IThreadPool *CMaterialSystem::CreateMatQueueThreadPool()
// that only the threadpool threads should execute these jobs.
startParams.bExecOnThreadPoolThreadsOnly = true;

m_pMatQueueThreadPool = CreateThreadPool1();
m_pMatQueueThreadPool = CreateThreadPool();
m_pMatQueueThreadPool->Start( startParams, "MatQueue" );
}

Expand Down
2 changes: 1 addition & 1 deletion public/vstdlib/jobthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ abstract_class IThreadPool : public IRefCounted

//-----------------------------------------------------------------------------

JOB_INTERFACE IThreadPool *CreateThreadPool1();
JOB_INTERFACE IThreadPool *CreateThreadPool();
JOB_INTERFACE void DestroyThreadPool( IThreadPool *pPool );

//-------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion replay/shared_replaycontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ bool CSharedReplayContext::InitThreadPool()
{
// Create thread pool
Log( "Replay: Creating thread pool..." );
IThreadPool *pThreadPool = CreateThreadPool1();
IThreadPool *pThreadPool = CreateThreadPool();
if ( !pThreadPool )
{
Log( "failed!\n" );
Expand Down
2 changes: 1 addition & 1 deletion vstdlib/jobthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class CThreadPool : public CRefCounted1<IThreadPool, CRefCountServiceMT>

//-----------------------------------------------------------------------------

JOB_INTERFACE IThreadPool *CreateThreadPool1()
JOB_INTERFACE IThreadPool *CreateThreadPool()
{
return new CThreadPool;
}
Expand Down
5 changes: 4 additions & 1 deletion vstdlib/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ def build(bld):
defines = []

libs = ['tier0','tier1']
linkflags = []

if bld.env.DEST_OS == 'android':
libs += ['ANDROID_SUPPORT']
elif bld.env.DEST_OS == 'darwin':
libs += ['ICONV', 'COREFOUNDATION', 'CORESERVICES']
libs += ['ICONV', 'COREFOUNDATION']
linkflags += ['-framework', 'CoreServices']

install_path = bld.env.LIBDIR

Expand All @@ -64,6 +66,7 @@ def build(bld):
includes = includes,
defines = defines,
use = libs,
linkflags = linkflags,
install_path = install_path,
subsystem = bld.env.MSVC_SUBSYSTEM,
idx = bld.get_taskgen_count()
Expand Down

0 comments on commit d8580d5

Please sign in to comment.