reduced footprint of client msg queue and numbers can go even higher

This commit is contained in:
JanEggers
2017-09-14 22:18:54 +02:00
parent cf7b7191f8
commit d1b634511d
3 changed files with 30 additions and 69 deletions
@@ -18,11 +18,16 @@ namespace MQTTnet.TestApp.NetFramework
public static async Task RunAsync()
{
var server = Task.Run(() => RunServerAsync());
var client = Task.Run(() => RunClientAsync(300, TimeSpan.FromMilliseconds(10)));
var client = Task.Run(() => RunClientAsync(400, TimeSpan.FromMilliseconds(10)));
await Task.WhenAll(server, client).ConfigureAwait(false);
}
private static Task RunClientsAsync(int msgChunkSize, TimeSpan interval)
{
return Task.WhenAll(Enumerable.Range(0, 3).Select((i) => Task.Run(() => RunClientAsync(msgChunkSize, interval))));
}
private static async Task RunClientAsync( int msgChunkSize, TimeSpan interval )
{
try