MCPcopy Create free account
hub / github.com/OpenMW/openmw / addWorkItem

Method addWorkItem

components/sceneutil/workqueue.cpp:70–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68 }
69
70 void WorkQueue::addWorkItem(osg::ref_ptr<WorkItem> item, bool front)
71 {
72 if (item->isDone())
73 {
74 Log(Debug::Error) << "Error: trying to add a work item that is already completed";
75 return;
76 }
77
78 std::unique_lock<std::mutex> lock(mMutex);
79 if (front)
80 mQueue.push_front(std::move(item));
81 else
82 mQueue.push_back(std::move(item));
83 mCondition.notify_one();
84 }
85
86 osg::ref_ptr<WorkItem> WorkQueue::removeWorkItem()
87 {

Callers 11

operator()Method · 0.80
flushMethod · 0.80
generateAllNavMeshTilesFunction · 0.80
updateMethod · 0.80
preloadCommonAssetsMethod · 0.80
renderMethod · 0.80
asyncWritePngMethod · 0.80
preloadMethod · 0.80
preloadMethod · 0.80
updateCacheMethod · 0.80

Calls 2

LogClass · 0.85
isDoneMethod · 0.45

Tested by

no test coverage detected