mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2026-10-24 03:50:57 +00:00
Queue test
This commit is contained in:
1 parent
8723031e93
commit
f1bbe8b6cd
4 files changed
+50
-11
No files matched your search
@@ -29,8 +29,10 @@ await wh.Open();
|
||||
long memAfter = GC.GetTotalMemory(forceFullCollection: true);
|
||||
double memMB = (memAfter - memBefore) / (1024.0 * 1024.0);
|
||||
|
||||
Console.WriteLine("Press ENTER to stop.");
|
||||
Console.ReadLine();
|
||||
Console.WriteLine("Ready. Press Ctrl+C to stop.");
|
||||
var stop = new TaskCompletionSource();
|
||||
Console.CancelKeyPress += (_, e) => { e.Cancel = true; stop.TrySetResult(); };
|
||||
await stop.Task;
|
||||
await wh.Close();
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user