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

Split list of awaiters in multi_producer_sequencer::add_awaiter #217

Open
dvetutnev opened this issue Mar 29, 2023 · 0 comments
Open

Split list of awaiters in multi_producer_sequencer::add_awaiter #217

dvetutnev opened this issue Mar 29, 2023 · 0 comments

Comments

@dvetutnev
Copy link

dvetutnev commented Mar 29, 2023

while (awaiters != nullptr)
{
	diff_t diff = TRAITS::difference(targetSequence, lastKnownPublished);
	if (diff > 0)
	{
		// Not yet ready.
		minDiff = diff < minDiff ? diff : minDiff;
		*awaitersToEnqueueTail = awaiters;
		awaitersToEnqueueTail = &awaiters->m_next;
		awaiters->m_lastKnownPublished = lastKnownPublished;
	}
	else
	{
		// Now ready.
		*awaitersToResumeTail = awaiters;
		awaitersToResumeTail = &awaiters->m_next;
	}
	awaiters = awaiters->m_next;
}

Maybe on line should be awaiters->m_targetSequence instead targetSequence?

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

1 participant