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
aa57a367
Commit
aa57a367
authored
Aug 28, 2018
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check vectors *early*, because: pain, so much pain
parent
23181898
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
ConnectionMultiplexer.cs
src/StackExchange.Redis/ConnectionMultiplexer.cs
+25
-0
No files found.
src/StackExchange.Redis/ConnectionMultiplexer.cs
View file @
aa57a367
...
...
@@ -965,8 +965,33 @@ internal ServerEndPoint GetServerEndPoint(EndPoint endpoint, TextWriter log = nu
}
internal
readonly
CommandMap
CommandMap
;
[
MethodImpl
(
MethodImplOptions
.
NoInlining
)]
private
static
void
CheckNumericsVectors
()
{
try
{
DoNothingWith
(
System
.
Numerics
.
Vector
.
IsHardwareAccelerated
,
System
.
Numerics
.
Vector
<
int
>.
Count
);
}
catch
(
Exception
ex
)
{
throw
new
InvalidOperationException
(
"It looks like there's a problem resolving System.Numerics.Vectors.dll; "
+
"this is a well-known pain point between .NET Framework and .NET Core - "
+
"try adding an explicit package reference to System.Numerics.Vectors; "
+
"and if you're wondering 'why do you need that?' - we actually don't: "
+
"it is a down-stream dependency that we don't need directly, but which "
+
"keeps causing pain."
,
ex
);
}
}
[
MethodImpl
(
MethodImplOptions
.
NoInlining
)]
#pragma warning disable RCS1163 // Unused parameter.
private
static
void
DoNothingWith
(
bool
b
,
int
i
)
{
}
#pragma warning restore RCS1163 // Unused parameter.
private
ConnectionMultiplexer
(
ConfigurationOptions
configuration
)
{
CheckNumericsVectors
();
IncludeDetailInExceptions
=
true
;
IncludePerformanceCountersInExceptions
=
false
;
...
...
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