17 #include <tbb/concurrent_hash_map.h>
18 #include <tbb/spin_mutex.h>
23 #include <boost/shared_ptr.hpp>
24 #include <boost/weak_ptr.hpp>
25 #include <boost/noncopyable.hpp>
55 static size_t hash(
const size_t& x )
60 static bool equal(
const size_t& x,
const size_t& y )
88 virtual boost::shared_ptr<DtAsyncJobMapEntry> addJob(
DtAsyncJob* job);
91 virtual void cancelAllJobs();
94 virtual void cancelAllJobsAndWait();
97 virtual bool empty()
const;
100 virtual bool running()
const;
103 virtual void printAsyncJobMap();
115 virtual size_t getNextId();
118 virtual void remove(
size_t id);
static bool equal(const size_t &x, const size_t &y)
Definition: asyncJobServer.h:60
DtAsyncJobStatus
State of job.
Definition: asyncJobServer.h:33
An asynchronous job that can be added to and executed by a job server.
Definition: asyncJob.h:47
tbb::spin_mutex Mutex
Definition: asyncJobServer.h:112
std::list< DtAsyncJob * > JobList
Definition: asyncJobServer.h:131
size_t myNumTasks
Definition: asyncJobServer.h:129
#define DT_DEFINE_OBJECT_DEBUGGER_NAME(type)
Definition: objectCounter.h:265
Default on in debug, off in release.
Definition: objectCounter.h:31
DtAsyncJobMap myAsyncJobMap
Definition: asyncJobServer.h:123
Definition: asyncJobServer.h:37
Mutex myNumTasksMutex
Definition: asyncJobServer.h:128
tbb::concurrent_hash_map< size_t, boost::weak_ptr< DtAsyncJobMapEntry >, MyHashCompare > DtAsyncJobMap
A concurrent hash map.
Definition: asyncJobServer.h:68
Definition: asyncJobServer.h:38
Definition: asyncJobServer.h:135
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
static size_t hash(const size_t &x)
Definition: asyncJobServer.h:55
Structure that defines hashing and comparison operations for users.
Definition: asyncJobServer.h:53
DtAsyncJobServer & server
Definition: asyncJobServer.h:142
JobList myCurrentJobs
Definition: asyncJobServer.h:133
Mutex myJobListMutex
Definition: asyncJobServer.h:132
#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:73
Mutex myIdGenMutex
Definition: asyncJobServer.h:125
size_t myNextId
Definition: asyncJobServer.h:126
Definition: asyncJobServer.h:35
JobList::iterator i
Definition: asyncJobServer.h:143