mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Lazy init default thread allocator.
This commit is contained in:
@@ -36,7 +36,11 @@ using namespace Windows::System::Threading;
|
||||
|
||||
namespace bx
|
||||
{
|
||||
static DefaultAllocator s_allocator;
|
||||
static AllocatorI* getAllocator()
|
||||
{
|
||||
static DefaultAllocator s_allocator;
|
||||
return &s_allocator;
|
||||
}
|
||||
|
||||
struct ThreadInternal
|
||||
{
|
||||
@@ -78,7 +82,7 @@ namespace bx
|
||||
Thread::Thread()
|
||||
: m_fn(NULL)
|
||||
, m_userData(NULL)
|
||||
, m_queue(&s_allocator)
|
||||
, m_queue(getAllocator() )
|
||||
, m_stackSize(0)
|
||||
, m_exitCode(kExitSuccess)
|
||||
, m_running(false)
|
||||
|
||||
Reference in New Issue
Block a user