Commit 285cd4a6 authored by Nick Craver's avatar Nick Craver

Clenaup: Message

parent c5034d50
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace StackExchange.Redis namespace StackExchange.Redis
{ {
sealed class MessageCompletable : ICompletable internal sealed class MessageCompletable : ICompletable
{ {
private readonly RedisChannel channel; private readonly RedisChannel channel;
...@@ -18,10 +18,8 @@ public MessageCompletable(RedisChannel channel, RedisValue message, Action<Redis ...@@ -18,10 +18,8 @@ public MessageCompletable(RedisChannel channel, RedisValue message, Action<Redis
this.handler = handler; this.handler = handler;
} }
public override string ToString() public override string ToString() => (string)channel;
{
return (string)channel;
}
public bool TryComplete(bool isAsync) public bool TryComplete(bool isAsync)
{ {
if (handler == null) return true; if (handler == null) return true;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace StackExchange.Redis namespace StackExchange.Redis
{ {
sealed partial class MessageQueue internal sealed partial class MessageQueue
{ {
private readonly Queue<Message> private readonly Queue<Message>
regular = new Queue<Message>(), regular = new Queue<Message>(),
...@@ -30,6 +30,7 @@ public Message Dequeue() ...@@ -30,6 +30,7 @@ public Message Dequeue()
/// <summary> /// <summary>
/// Checks both high-pri and regular queues to see if the next item is a PING, and if so: dequeues it and returns it /// Checks both high-pri and regular queues to see if the next item is a PING, and if so: dequeues it and returns it
/// </summary> /// </summary>
/// <param name="queueLength">The current queue count.</param>
public Message DequeueUnsentPing(out int queueLength) public Message DequeueUnsentPing(out int queueLength)
{ {
lock (regular) lock (regular)
...@@ -92,6 +93,7 @@ internal Message[] DequeueAll() ...@@ -92,6 +93,7 @@ internal Message[] DequeueAll()
return arr; return arr;
} }
} }
internal void GetStormLog(StringBuilder sb) internal void GetStormLog(StringBuilder sb)
{ {
lock(regular) lock(regular)
......
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