Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
285cd4a6
Commit
285cd4a6
authored
Mar 11, 2018
by
Nick Craver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clenaup: Message
parent
c5034d50
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
52 deletions
+87
-52
Message.cs
StackExchange.Redis/StackExchange/Redis/Message.cs
+81
-46
MessageCompletable.cs
...kExchange.Redis/StackExchange/Redis/MessageCompletable.cs
+3
-5
MessageQueue.cs
StackExchange.Redis/StackExchange/Redis/MessageQueue.cs
+3
-1
No files found.
StackExchange.Redis/StackExchange/Redis/Message.cs
View file @
285cd4a6
This diff is collapsed.
Click to expand it.
StackExchange.Redis/StackExchange/Redis/MessageCompletable.cs
View file @
285cd4a6
...
@@ -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
;
...
...
StackExchange.Redis/StackExchange/Redis/MessageQueue.cs
View file @
285cd4a6
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment