Commit adbc96c0 authored by Nick Craver's avatar Nick Craver

PubSub: doh

parent 98616af7
...@@ -383,7 +383,7 @@ async Task RunLoop() ...@@ -383,7 +383,7 @@ async Task RunLoop()
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)
{ {
sub.Publish(channel, i.ToString(), CommandFlags.FireAndForget); sub.Publish(channel, i.ToString(), CommandFlags.FireAndForget);
if ((data.Count % 100) == 99) Log("Published: " + data.Count.ToString()); if ((i % 100) == 99) Log("Published: " + data.Count.ToString());
} }
Log("Send loop complete."); Log("Send loop complete.");
if (!Monitor.Wait(syncLock, 20000)) if (!Monitor.Wait(syncLock, 20000))
...@@ -451,7 +451,7 @@ public async Task PubSubGetAllCorrectOrder_OnMessage_Sync() ...@@ -451,7 +451,7 @@ public async Task PubSubGetAllCorrectOrder_OnMessage_Sync()
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)
{ {
sub.Publish(channel, i.ToString(), CommandFlags.FireAndForget); sub.Publish(channel, i.ToString(), CommandFlags.FireAndForget);
if ((data.Count % 100) == 99) Log("Published: " + data.Count.ToString()); if ((i % 100) == 99) Log("Published: " + data.Count.ToString());
} }
Log("Send loop complete."); Log("Send loop complete.");
if (!Monitor.Wait(syncLock, 20000)) if (!Monitor.Wait(syncLock, 20000))
...@@ -521,7 +521,7 @@ public async Task PubSubGetAllCorrectOrder_OnMessage_Async() ...@@ -521,7 +521,7 @@ public async Task PubSubGetAllCorrectOrder_OnMessage_Async()
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)
{ {
sub.Publish(channel, i.ToString(), CommandFlags.FireAndForget); sub.Publish(channel, i.ToString(), CommandFlags.FireAndForget);
if ((data.Count % 100) == 99) Log("Published: " + data.Count.ToString()); if ((i % 100) == 99) Log("Published: " + data.Count.ToString());
} }
Log("Send loop complete."); Log("Send loop complete.");
if (!Monitor.Wait(syncLock, 20000)) if (!Monitor.Wait(syncLock, 20000))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment