MCPcopy Create free account
hub / github.com/GrapheneCt/NetStream / AddAsync

Method AddAsync

NetStream/source/tex_pool.cpp:165–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165bool TexPool::AddAsync(IDParam const& id, uint8_t *buffer, size_t bufferSize, bool allowReplace)
166{
167 if (!m_alive)
168 {
169 return false;
170 }
171
172 if (!allowReplace)
173 {
174 if (Exist(id))
175 {
176 return false;
177 }
178 }
179 AddAsyncJob *job = new AddAsyncJob(this, id.GetIDHash(), buffer, bufferSize);
180 common::SharedPtr<job::JobItem> itemParam(job);
181 m_addAsyncQueue->Enqueue(itemParam);
182 return true;
183}
184
185bool TexPool::AddAsync(IDParam const& id, const char *path, bool allowReplace)
186{

Callers

nothing calls this directly

Calls 1

EnqueueMethod · 0.80

Tested by

no test coverage detected