Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProtectedEventStream::process can't consume the _queue #46

Open
gitbufenshuo opened this issue Nov 23, 2022 · 1 comment
Open

ProtectedEventStream::process can't consume the _queue #46

gitbufenshuo opened this issue Nov 23, 2022 · 1 comment

Comments

@gitbufenshuo
Copy link

                         // ProtectedEventStream::process method
                         if(limit >= _queue.size())
			{
				processEvents.reserve(_queue.size());
				std::swap(processEvents, _queue);
			}
			else
			{
				const auto countElements = std::min(limit, _queue.size());
				processEvents.reserve(countElements);
				std::move(_queue.begin(),
						  std::next(_queue.begin(), countElements),
						  std::back_inserter(processEvents));
			        // _queue.size() remains unchanged
                         }
@gelldur
Copy link
Owner

gelldur commented Nov 24, 2022

Thank you, fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants