void push()

in Source/Shared/arcana/threading/blocking_concurrent_queue.h [20:39]


        void push(G&& data)
        {
            bool notify = false;
            {
                std::unique_lock<std::mutex> lock{ m_mutex };

                notify = m_data.empty();
                m_data.push(std::forward<G>(data));

                while (m_data.size() > max_size)
                {
                    m_data.pop();
                }
            }
            if (notify)
            {
                // See Reasoning 1
                m_dataReady.notify_one();
            }
        }