18 #include <tbb/concurrent_hash_map.h>
19 #include <tbb/spin_mutex.h>
24 #include <boost/noncopyable.hpp>
28 #include <tbb/task_arena.h>
44 #ifdef DtObjectDebugger_Enable
56 typedef std::map<size_t, std::weak_ptr<DtAsyncJobMapEntry> >
DtAsyncJobMap;
76 virtual std::shared_ptr<DtAsyncJobMapEntry> addJob(
DtAsyncJob* job);
79 virtual void cancelAllJobs();
82 virtual void cancelAllJobsAndWait();
85 virtual bool empty()
const;
88 virtual bool running()
const;
91 virtual void printAsyncJobMap();
96 virtual void waitOnJobs();
105 virtual size_t getNextId();
108 virtual void remove(
size_t id);
DtAsyncJobStatus
State of job.
Definition: asyncJobServer.h:33
An asynchronous job that can be added to and executed by a job server. Since this class derives from ...
Definition: asyncJob.h:46
tbb::spin_mutex Mutex
Definition: asyncJobServer.h:102
std::unique_ptr< tbb::task_arena > myTaskArena
Definition: asyncJobServer.h:138
std::list< DtAsyncJob * > JobList
Definition: asyncJobServer.h:122
static long long theQuittingIoPeriod
Io period - milliseconds.
Definition: asyncJobServer.h:141
size_t myNumTasks
Definition: asyncJobServer.h:120
#define DT_DEFINE_OBJECT_DEBUGGER_NAME(type)
Definition: objectCounter.h:31
Default on in debug, off in release.
Definition: objectCounter.h:27
Mutex myAsyncJobMapMutex
Definition: asyncJobServer.h:113
DtAsyncJobMap myAsyncJobMap
Definition: asyncJobServer.h:114
Definition: asyncJobServer.h:37
Mutex myNumTasksMutex
Definition: asyncJobServer.h:119
Definition: asyncJobServer.h:38
Definition: asyncJobServer.h:126
Definition: asyncJobServer.h:36
Base class for result of job.
Definition: asyncJobServer.h:43
Definition: asyncJobServer.h:39
Handle to async job.
Definition: asyncJobMapEntry.h:29
DtAsyncJobServer & server
Definition: asyncJobServer.h:133
JobList myCurrentJobs
Definition: asyncJobServer.h:124
Mutex myJobListMutex
Definition: asyncJobServer.h:123
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
Manages async job objects.
Definition: asyncJobServer.h:61
Mutex myIdGenMutex
Definition: asyncJobServer.h:116
std::map< size_t, std::weak_ptr< DtAsyncJobMapEntry > > DtAsyncJobMap
Map of job IDs to job entries.
Definition: asyncJobServer.h:56
size_t myNextId
Definition: asyncJobServer.h:117
Definition: asyncJobServer.h:35
JobList::iterator i
Definition: asyncJobServer.h:134