MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / queueAsset

Method queueAsset

source/base/StarAssets.cpp:768–780  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

766}
767
768void Assets::queueAsset(AssetId const& assetId) const {
769 auto i = m_assetsCache.find(assetId);
770 if (i != m_assetsCache.end()) {
771 if (i->second)
772 freshen(i->second);
773 } else {
774 auto j = m_queue.find(assetId);
775 if (j == m_queue.end()) {
776 m_queue[assetId] = QueuePriority::Load;
777 m_assetsQueued.signal();
778 }
779 }
780}
781
782shared_ptr<Assets::AssetData> Assets::tryAsset(AssetId const& id) const {
783 MutexLocker assetsLocker(m_assetsMutex);

Callers

nothing calls this directly

Calls 3

findMethod · 0.45
endMethod · 0.45
signalMethod · 0.45

Tested by

no test coverage detected