1
0
mirror of synced 2024-11-24 01:33:50 +00:00
Tapeti/Test/MarcoEmitter.cs
Mark van Renswoude 74985e45de Fixed all ReSharper issues
Some are silly, like the "member not used" for public interfaces. The comments everywhere are ugly, sorry, but it keeps the possibly important issues visible without a dependency on some ReSharper annotations package.
2018-12-19 20:50:56 +01:00

51 lines
1.1 KiB
C#

using System.Threading.Tasks;
namespace Test
{
public class MarcoEmitter
{
//private readonly IPublisher publisher;
/*public MarcoEmitter(IPublisher publisher)
{
this.publisher = publisher;
}
*/
public async Task Run()
{
//await publisher.Publish(new MarcoMessage());
/*
var concurrent = new SemaphoreSlim(20);
while (true)
{
for (var x = 0; x < 200; x++)
{
await concurrent.WaitAsync();
try
{
await publisher.Publish(new MarcoMessage());
}
finally
{
concurrent.Release();
}
}
await Task.Delay(200);
}
*/
while (true)
{
await Task.Delay(1000);
}
// ReSharper disable once FunctionNeverReturns
}
}
}