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

Implement a try-to-dispatch concept #846

Merged
merged 1 commit into from Feb 10, 2016
Merged

Conversation

codemercenary
Copy link
Contributor

This is useful for cases where consumers want to be able to retry lambdas from the dispatch queue while preserving order in single-threaded use cases.

This is useful for cases where consumers want to be able to retry lambdas from the dispatch queue while preserving order in single-threaded use cases.
catch (...) {
// Failed to execute thunk, put it back
lk.lock();
pThunk->m_pFlink = m_pHead;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From reading the comments in the header, I thought we are putting this thunk back to the tail of the queue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Negative, comment states that the item is replaced at the front of the queue on failure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see.

@veronicaz41
Copy link
Contributor

Interesting. What is the use case for this?

veronicaz41 pushed a commit that referenced this pull request Feb 10, 2016
Implement a try-to-dispatch concept
@veronicaz41 veronicaz41 merged commit 394e7ed into develop Feb 10, 2016
@veronicaz41 veronicaz41 deleted the feature-trydispatch branch February 10, 2016 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants