MCPcopy Create free account
hub / github.com/3Shain/dxmt / EncodingThread

Method EncodingThread

src/dxmt/dxmt_command_queue.cpp:147–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147uint32_t
148CommandQueue::EncodingThread() {
149#if ASYNC_ENCODING
150 env::setThreadName("dxmt-encode-thread");
151 SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
152 uint64_t internal_seq = 1;
153 while (!stopped.load()) {
154 ready_for_encode.wait(internal_seq, std::memory_order_acquire);
155 if (stopped.load())
156 break;
157 // perform...
158 auto &chunk = chunks[internal_seq % kCommandChunkCount];
159 CommitChunkInternal(chunk, internal_seq);
160 internal_seq++;
161 }
162 TRACE("encoder thread gracefully terminates");
163#endif
164 return 0;
165}
166
167uint32_t
168CommandQueue::WaitForFinishThread() {

Callers 1

CommandQueueMethod · 0.95

Calls 4

setThreadNameFunction · 0.85
SetThreadPriorityFunction · 0.85
GetCurrentThreadFunction · 0.85
waitMethod · 0.45

Tested by

no test coverage detected