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
003aa073
Commit
003aa073
authored
Aug 15, 2018
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix break to count of sync completions from MatchResult
parent
75208257
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
CompletionManager.cs
StackExchange.Redis/CompletionManager.cs
+5
-0
PhysicalConnection.cs
StackExchange.Redis/PhysicalConnection.cs
+12
-4
No files found.
StackExchange.Redis/CompletionManager.cs
View file @
003aa073
...
@@ -8,6 +8,9 @@ internal static class CompletionManagerHelpers
...
@@ -8,6 +8,9 @@ internal static class CompletionManagerHelpers
public
static
void
CompleteSyncOrAsync
(
this
PhysicalBridge
bridge
,
ICompletable
operation
)
public
static
void
CompleteSyncOrAsync
(
this
PhysicalBridge
bridge
,
ICompletable
operation
)
=>
CompletionManager
.
CompleteSyncOrAsyncImpl
(
bridge
?.
completionManager
,
operation
);
=>
CompletionManager
.
CompleteSyncOrAsyncImpl
(
bridge
?.
completionManager
,
operation
);
public
static
void
IncrementSyncCount
(
this
PhysicalBridge
bridge
)
=>
bridge
?.
completionManager
?.
IncrementSyncCount
();
public
static
void
CompleteAsync
(
this
PhysicalBridge
bridge
,
ICompletable
operation
)
public
static
void
CompleteAsync
(
this
PhysicalBridge
bridge
,
ICompletable
operation
)
=>
CompletionManager
.
CompleteAsync
(
bridge
?.
completionManager
,
operation
);
=>
CompletionManager
.
CompleteAsync
(
bridge
?.
completionManager
,
operation
);
...
@@ -23,6 +26,8 @@ internal static void CompleteSyncOrAsyncImpl(CompletionManager manager, IComplet
...
@@ -23,6 +26,8 @@ internal static void CompleteSyncOrAsyncImpl(CompletionManager manager, IComplet
else
SharedCompleteSyncOrAsync
(
operation
);
else
SharedCompleteSyncOrAsync
(
operation
);
}
}
internal
void
IncrementSyncCount
()
=>
Interlocked
.
Increment
(
ref
completedSync
);
internal
static
void
CompleteAsync
(
CompletionManager
manager
,
ICompletable
operation
)
internal
static
void
CompleteAsync
(
CompletionManager
manager
,
ICompletable
operation
)
{
{
var
sched
=
manager
.
multiplexer
.
SocketManager
;
var
sched
=
manager
.
multiplexer
.
SocketManager
;
...
...
StackExchange.Redis/PhysicalConnection.cs
View file @
003aa073
...
@@ -1276,10 +1276,18 @@ private void MatchResult(RawResult result)
...
@@ -1276,10 +1276,18 @@ private void MatchResult(RawResult result)
}
}
Trace
(
"Response to: "
+
msg
);
Trace
(
"Response to: "
+
msg
);
if
(
msg
.
ComputeResult
(
this
,
result
)
&&
!
msg
.
TryComplete
(
false
))
if
(
msg
.
ComputeResult
(
this
,
result
))
{
// got a result, and we couldn't complete it synchronously;
{
// note that we want to complete it async instead
if
(
msg
.
TryComplete
(
false
))
BridgeCouldBeNull
.
CompleteAsync
(
msg
);
{
BridgeCouldBeNull
.
IncrementSyncCount
();
}
else
{
// got a result, and we couldn't complete it synchronously;
// note that we want to complete it async instead
BridgeCouldBeNull
.
CompleteAsync
(
msg
);
}
}
}
}
}
...
...
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