bug fix, default threading support
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@178 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
c3da9552e6
commit
1237efed14
2 changed files with 11 additions and 4 deletions
|
@ -29,6 +29,10 @@
|
|||
#define C_CALLING_CONVENTION_QUALIFIER
|
||||
#endif
|
||||
|
||||
#ifndef SINGLETON_DEFAULT_THREADING
|
||||
#define SINGLETON_DEFAULT_THREADING ::Loki::SingleThreaded
|
||||
#endif
|
||||
|
||||
namespace Loki
|
||||
{
|
||||
typedef void (C_CALLING_CONVENTION_QUALIFIER *atexit_pfn_t)();
|
||||
|
@ -337,7 +341,7 @@ namespace Loki
|
|||
typename T,
|
||||
template <class> class CreationPolicy = CreateUsingNew,
|
||||
template <class> class LifetimePolicy = DefaultLifetime,
|
||||
template <class> class ThreadingModel = SingleThreaded
|
||||
template <class> class ThreadingModel = SINGLETON_DEFAULT_THREADING
|
||||
>
|
||||
class SingletonHolder
|
||||
{
|
||||
|
|
|
@ -18,8 +18,11 @@
|
|||
# pragma warning(disable: 4018 4097 4100 4213 4290 4512 4514 4700 4702 4710 4786 4800)
|
||||
#endif
|
||||
|
||||
//#define DEFAULT_THREADING ::Loki::ObjectLevelLockable
|
||||
//#define DEFAULT_THREADING ::Loki::ClassLevelLockable
|
||||
//#define TEST_THREADS
|
||||
#ifdef TEST_THREADS
|
||||
#define DEFAULT_THREADING ::Loki::ClassLevelLockable
|
||||
#define SINGLETON_DEFAULT_THREADING ::Loki::ClassLevelLockable
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#include <Windows.h> // for threads, part of the sdk, disable if not found
|
||||
|
@ -55,7 +58,7 @@ Test::tests_type Test::tests;
|
|||
#include "AssocVectorTest.h"
|
||||
#include "FunctorTest.h"
|
||||
#include "DataGeneratorsTest.h"
|
||||
/* */
|
||||
|
||||
/*
|
||||
* AP - All Pass
|
||||
* FC - Fails to Compile
|
||||
|
|
Loading…
Add table
Reference in a new issue