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

Remove now unnecessary yield #900

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .idea/.idea.RabbitMQDotNetClient/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.idea.RabbitMQDotNetClient/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/.idea.RabbitMQDotNetClient/.idea/indexLayout.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/.idea.RabbitMQDotNetClient/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/.idea.RabbitMQDotNetClient/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/.idea.RabbitMQDotNetClient/riderModule.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 2 additions & 10 deletions projects/RabbitMQ.Client/client/impl/Work.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,9 @@ protected Work(IBasicConsumer consumer)
_asyncConsumer = (IAsyncBasicConsumer)consumer;
}

public async Task Execute(ModelBase model)
public Task Execute(ModelBase model)
{
try
{
await Task.Yield();
await Execute(model, _asyncConsumer).ConfigureAwait(false);
}
catch (Exception)
{
// intentionally caught
}
return Execute(model, _asyncConsumer);
}

protected abstract Task Execute(ModelBase model, IAsyncBasicConsumer consumer);
Expand Down
30 changes: 30 additions & 0 deletions projects/RabbitMQ.Client/client/impl/Work.cs.orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System;
using System.Threading.Tasks;

namespace RabbitMQ.Client.Impl
{
internal abstract class Work
{
readonly IAsyncBasicConsumer _asyncConsumer;

protected Work(IBasicConsumer consumer)
{
_asyncConsumer = (IAsyncBasicConsumer)consumer;
}

public async Task Execute(IModel model)
{
try
{
await Task.Yield();
await Execute(model, _asyncConsumer).ConfigureAwait(false);
}
catch (Exception)
{
// intentionally caught
}
}

protected abstract Task Execute(IModel model, IAsyncBasicConsumer consumer);
}
}
862 changes: 862 additions & 0 deletions projects/Unit/APIApproval.Approve.verified.txt.bak

Large diffs are not rendered by default.