MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / postWork

Method postWork

tests/test_python_integration.cpp:128–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126 lfs::vis::RenderingManager* getRenderingManager() override { return nullptr; }
127
128 bool postWork(WorkItem work) override {
129 ++post_work_calls;
130 if (!accepts_posted_work) {
131 if (work.cancel) {
132 work.cancel();
133 }
134 return false;
135 }
136 if (queue_posted_work) {
137 {
138 std::lock_guard lock(queued_work_mutex);
139 queued_work.push_back(std::move(work));
140 }
141 queued_work_cv.notify_all();
142 return true;
143 }
144 if (work.run) {
145 work.run();
146 }
147 return true;
148 }
149
150 [[nodiscard]] bool isOnViewerThread() const override { return on_viewer_thread; }
151 [[nodiscard]] bool acceptsPostedWork() const override { return accepts_posted_work; }

Callers

nothing calls this directly

Calls 4

moveFunction · 0.85
cancelMethod · 0.45
push_backMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected