MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ acquire()

size_t MayaFlux::Portal::Graphics::SlotArena::acquire ( )
nodiscard

A slot nothing holds a lease on, growing the arena if none is free.

Definition at line 67 of file SlotMachine.cpp.

68{
69 for (size_t slot = 0; slot < m_uses.size(); ++slot) {
70 if (m_uses[slot]->load(std::memory_order_acquire) == 0) {
71 return slot;
72 }
73 }
74
75 const size_t slot = m_uses.size();
76 return grow() ? slot : 0;
77}
std::vector< std::shared_ptr< std::atomic< uint32_t > > > m_uses

References grow(), and m_uses.

Here is the call graph for this function: