mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
linux and tests
fix linux build change thread test to use TorqueThreadPool
This commit is contained in:
parent
948d2e5cef
commit
399844f7f1
|
|
@ -30,7 +30,7 @@ FIXTURE(ThreadPool)
|
|||
public:
|
||||
// Represents a single unit of work. In this test we just set an element in
|
||||
// a result vector.
|
||||
struct TestItem : public ThreadPool::WorkItem
|
||||
struct TestItem : public TorqueThreadPool::WorkItem
|
||||
{
|
||||
U32 mIndex;
|
||||
Vector<U32>& mResults;
|
||||
|
|
@ -46,7 +46,7 @@ public:
|
|||
|
||||
// A worker that delays for some time. We'll use this to test the ThreadPool's
|
||||
// synchronous and asynchronous operations.
|
||||
struct DelayItem : public ThreadPool::WorkItem
|
||||
struct DelayItem : public TorqueThreadPool::WorkItem
|
||||
{
|
||||
U32 ms;
|
||||
DelayItem(U32 _ms) : ms(_ms) {}
|
||||
|
|
@ -69,7 +69,7 @@ TEST_FIX(ThreadPool, BasicAPI)
|
|||
results[i] = U32(-1);
|
||||
|
||||
// Launch the work items.
|
||||
ThreadPool* pool = &ThreadPool::GLOBAL();
|
||||
TorqueThreadPool* pool = &TorqueThreadPool::GLOBAL();
|
||||
for (U32 i = 0; i < numItems; i++)
|
||||
{
|
||||
ThreadSafeRef<TestItem> item(new TestItem(i, results));
|
||||
|
|
@ -89,7 +89,7 @@ TEST_FIX(ThreadPool, Asynchronous)
|
|||
const U32 delay = 500; //ms
|
||||
|
||||
// Launch a single delaying work item.
|
||||
ThreadPool* pool = &ThreadPool::GLOBAL();
|
||||
TorqueThreadPool* pool = &TorqueThreadPool::GLOBAL();
|
||||
ThreadSafeRef<DelayItem> item(new DelayItem(delay));
|
||||
pool->queueWorkItem(item);
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ TEST_FIX(ThreadPool, Synchronous)
|
|||
const U32 delay = 500; //ms
|
||||
|
||||
// Launch a single delaying work item.
|
||||
ThreadPool* pool = &ThreadPool::GLOBAL();
|
||||
TorqueThreadPool* pool = &TorqueThreadPool::GLOBAL();
|
||||
ThreadSafeRef<DelayItem> item(new DelayItem(delay));
|
||||
pool->queueWorkItem(item);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#define ENABLE_VHACD_IMPLEMENTATION 1
|
||||
#define VHACD_DISABLE_THREADING 0
|
||||
#include <VHACD.H>
|
||||
#include "ts/vhacd/VHACD.h"
|
||||
#include <FloatMath.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue