diff options
author | jackpoz <giacomopoz@gmail.com> | 2014-08-22 16:58:23 +0200 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2014-08-22 21:00:56 +0200 |
commit | 5e8277e923c5545a15bae7c740ab6afaa597a59f (patch) | |
tree | 4cf5212c080588a7e868ee60134fc7fff51e400a /dep/g3dlite/include/G3D/ThreadSet.h | |
parent | a63aa858dcb400eafb97eed1f590e34c27d934a4 (diff) |
Core/Dependencies: Update G3D to v9.0 r4036
Diffstat (limited to 'dep/g3dlite/include/G3D/ThreadSet.h')
-rw-r--r-- | dep/g3dlite/include/G3D/ThreadSet.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/dep/g3dlite/include/G3D/ThreadSet.h b/dep/g3dlite/include/G3D/ThreadSet.h index 121f1415a1d..5b78e44d6ee 100644 --- a/dep/g3dlite/include/G3D/ThreadSet.h +++ b/dep/g3dlite/include/G3D/ThreadSet.h @@ -1,14 +1,16 @@ -#ifndef G3D_THREADSET_H -#define G3D_THREADSET_H +#ifndef G3D_ThreadSet_h +#define G3D_ThreadSet_h #include "G3D/platform.h" #include "G3D/Array.h" #include "G3D/ReferenceCount.h" -#include "G3D/GThread.h" #include "G3D/GMutex.h" +#include "G3D/SpawnBehavior.h" namespace G3D { +class GThread; + /** Manages a set of threads. All methods are threadsafe except for the iterator begin/end. @@ -18,8 +20,8 @@ public: /** Intended to allow future use with a template parameter.*/ typedef GThread Thread; - typedef ReferenceCountedPointer<Thread> ThreadRef; - typedef ReferenceCountedPointer<ThreadSet> Ref; + typedef shared_ptr<Thread> ThreadRef; + typedef shared_ptr<ThreadSet> Ref; typedef Array<ThreadRef>::Iterator Iterator; typedef Array<ThreadRef>::ConstIterator ConstIterator; @@ -41,13 +43,14 @@ public: /** Start all threads that are not currently started. - @param lastThreadBehavior If USE_CURRENT_THREAD, takes the last unstarted thread and executes it manually on - the current thread. This helps to take full advantage of the machine when - running a large number of jobs and avoids the overhead of a thread start for single-thread groups. - Note that this forces start() to block until - that thread is complete. + @param lastThreadBehavior If USE_CURRENT_THREAD, takes the + last unstarted thread and executes it manually on the current + thread. This helps to take full advantage of the machine when + running a large number of jobs and avoids the overhead of a + thread start for single-thread groups. Note that this forces + start() to block until that thread is complete. */ - void start(GThread::SpawnBehavior lastThreadBehavior = GThread::USE_NEW_THREAD) const; + void start(SpawnBehavior lastThreadBehavior = USE_NEW_THREAD) const; /** Terminate all threads that are currently started */ void terminate() const; |