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

Make sure corresponding Connection and Channel token properly float into handlers #1740

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danielmarbach
Copy link
Collaborator

@danielmarbach danielmarbach commented Dec 8, 2024

I started doing this and then soon realized the work is probably more involved. In general, it would likely be good to figure out what cancellation behavior we want as part of close and shutdown and then with that agreement go through the internal APIs again that are getting the AsyncEventArgs.

There are many more cases like the one in the PR that need to be properly thought through

Proposed Changes

Please describe the big picture of your changes here to communicate to the
RabbitMQ team why we should accept this pull request. If it fixes a bug or
resolves a feature request, be sure to link to that issue.

A pull request that doesn't explain why the change was made has a much
lower chance of being accepted.

If English isn't your first language, don't worry about it and try to
communicate the problem you are trying to solve to the best of your abilities.
As long as we can understand the intent, it's all good.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

Further Comments

If this is a relatively large or complex change, kick off the discussion by
explaining why you chose the solution you did and what alternatives you
considered, etc.

@danielmarbach danielmarbach force-pushed the token-event-args branch 2 times, most recently from 378121a to 9027a9f Compare December 8, 2024 09:15
@danielmarbach danielmarbach marked this pull request as ready for review December 8, 2024 09:25
@paulomorgado
Copy link
Contributor

@danielmarbach, do you have any scenario in mind for the use of the cancellation token in the event args?

@danielmarbach
Copy link
Collaborator Author

@danielmarbach, do you have any scenario in mind for the use of the cancellation token in the event args?

Not sure I understand your question. Can you elaborate? The token is part of the event args. The entire idea is that cancelation can be observed in the handlers as well

@paulomorgado
Copy link
Contributor

@danielmarbach, do you have any scenario in mind for the use of the cancellation token in the event args?

Not sure I understand your question. Can you elaborate? The token is part of the event args. The entire idea is that cancelation can be observed in the handlers as well

I understand that. I was just wondering in what scenario I would want to observe that cancelation token and what could I do with it.

@danielmarbach
Copy link
Collaborator Author

@danielmarbach, do you have any scenario in mind for the use of the cancellation token in the event args?

Not sure I understand your question. Can you elaborate? The token is part of the event args. The entire idea is that cancelation can be observed in the handlers as well

I understand that. I was just wondering in what scenario I would want to observe that cancelation token and what could I do with it.

Got it. The intent is that any handler method as the chance to participate in cooperative cancellation and given event handler delegates to not follow the regular method parameter guidance the cancellation token is part of the event args.

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

Successfully merging this pull request may close these issues.

2 participants