Skip to content

Commit 0cd705e

Browse files
michaelklishinlukebakken
authored andcommitted
Merge pull request #855 from bollhals/remove.task.yield
remove task yield
1 parent 04bca53 commit 0cd705e

File tree

1 file changed

+3
-12
lines changed
  • projects/RabbitMQ.Client/client/impl

1 file changed

+3
-12
lines changed

projects/RabbitMQ.Client/client/impl/Work.cs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System;
2-
using System.Threading.Tasks;
1+
using System.Threading.Tasks;
32

43
namespace RabbitMQ.Client.Impl
54
{
@@ -12,17 +11,9 @@ protected Work(IBasicConsumer consumer)
1211
_asyncConsumer = (IAsyncBasicConsumer)consumer;
1312
}
1413

15-
public async Task Execute(ModelBase model)
14+
public Task Execute(ModelBase model)
1615
{
17-
try
18-
{
19-
await Task.Yield();
20-
await Execute(model, _asyncConsumer).ConfigureAwait(false);
21-
}
22-
catch (Exception)
23-
{
24-
// intentionally caught
25-
}
16+
return Execute(model, _asyncConsumer);
2617
}
2718

2819
protected abstract Task Execute(ModelBase model, IAsyncBasicConsumer consumer);

0 commit comments

Comments
 (0)