MCPcopy Create free account
hub / github.com/cuberite/cuberite / FastSetQueuedBlocks

Method FastSetQueuedBlocks

src/ChunkMap.cpp:2938–2953  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2936
2937
2938void cChunkMap::FastSetQueuedBlocks()
2939{
2940 // Asynchronously set blocks:
2941 sSetBlockList FastSetBlockQueueCopy;
2942 {
2943 cCSLock Lock(m_CSFastSetBlock);
2944 std::swap(FastSetBlockQueueCopy, m_FastSetBlockQueue);
2945 }
2946 this->FastSetBlocks(FastSetBlockQueueCopy);
2947 if (!FastSetBlockQueueCopy.empty())
2948 {
2949 // Some blocks failed, store them for next tick:
2950 cCSLock Lock(m_CSFastSetBlock);
2951 m_FastSetBlockQueue.splice(m_FastSetBlockQueue.end(), FastSetBlockQueueCopy);
2952 }
2953}
2954
2955
2956

Callers 1

TickMethod · 0.80

Calls 3

FastSetBlocksMethod · 0.95
emptyMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected