rabbitmq / rabbitmq-dotnet-client

RabbitMQ .NET client for .NET Standard 2.0+ and .NET 4.6.2+
https://www.rabbitmq.com/dotnet.html
Other
2.06k stars 574 forks source link

Update Task.Factory.StartNew to specify TaskScheduler.Default #1358

Closed brandonagr closed 9 months ago

brandonagr commented 1 year ago

Proposed Changes

Without specifying TaskScheduler.Default explicitly it will use TaskScheduler.Current, which could lead to unexpected behavior depending on what tasks call into this code

This fixes https://github.com/rabbitmq/rabbitmq-dotnet-client/issues/1357

Types of Changes

What types of changes does your code introduce to this project?

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.

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.

pivotal-cla commented 1 year ago

@brandonagr Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

michaelklishin commented 1 year ago

@pivotal-cla this is an obvious fix

pivotal-cla commented 1 year ago

@brandonagr This Pull Request contains an obvious fix. Signing the Contributor License Agreement is not necessary.

lukebakken commented 9 months ago

Thank you! I did this in #1388