Commit fada6f5d authored by Marc Gravell's avatar Marc Gravell

Move SocketManager.ManagerState so that the mono build doesn't fail

parent 0c7f531a
......@@ -31,6 +31,16 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono|AnyCPU'">
<OutputPath>bin\Mono\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
......
......@@ -55,6 +55,17 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono|AnyCPU'">
<OutputPath>bin\Mono\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
......
......@@ -31,6 +31,16 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono|AnyCPU'">
<OutputPath>bin\Mono\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.cs" />
</ItemGroup>
......
......@@ -34,6 +34,15 @@
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono|AnyCPU'">
<OutputPath>bin\Mono\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
......
......@@ -49,6 +49,15 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono|AnyCPU'">
<OutputPath>bin\Mono\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="BookSleeve">
<HintPath>..\packages\BookSleeve.1.3.41\lib\BookSleeve.dll</HintPath>
......

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30723.0
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StackExchange.Redis", "StackExchange.Redis\StackExchange.Redis.csproj", "{7CEC07F2-8C03-4C42-B048-738B215824C1}"
EndProject
......@@ -60,6 +60,7 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Log Output|Any CPU = Log Output|Any CPU
Mono|Any CPU = Mono|Any CPU
Release|Any CPU = Release|Any CPU
Verbose|Any CPU = Verbose|Any CPU
EndGlobalSection
......@@ -68,6 +69,8 @@ Global
{7CEC07F2-8C03-4C42-B048-738B215824C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7CEC07F2-8C03-4C42-B048-738B215824C1}.Log Output|Any CPU.ActiveCfg = Log Output|Any CPU
{7CEC07F2-8C03-4C42-B048-738B215824C1}.Log Output|Any CPU.Build.0 = Log Output|Any CPU
{7CEC07F2-8C03-4C42-B048-738B215824C1}.Mono|Any CPU.ActiveCfg = Mono|Any CPU
{7CEC07F2-8C03-4C42-B048-738B215824C1}.Mono|Any CPU.Build.0 = Mono|Any CPU
{7CEC07F2-8C03-4C42-B048-738B215824C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7CEC07F2-8C03-4C42-B048-738B215824C1}.Release|Any CPU.Build.0 = Release|Any CPU
{7CEC07F2-8C03-4C42-B048-738B215824C1}.Verbose|Any CPU.ActiveCfg = Verbose|Any CPU
......@@ -76,6 +79,8 @@ Global
{19C00111-1328-4089-8565-94920B5B47F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19C00111-1328-4089-8565-94920B5B47F2}.Log Output|Any CPU.ActiveCfg = Log Output|Any CPU
{19C00111-1328-4089-8565-94920B5B47F2}.Log Output|Any CPU.Build.0 = Log Output|Any CPU
{19C00111-1328-4089-8565-94920B5B47F2}.Mono|Any CPU.ActiveCfg = Mono|Any CPU
{19C00111-1328-4089-8565-94920B5B47F2}.Mono|Any CPU.Build.0 = Mono|Any CPU
{19C00111-1328-4089-8565-94920B5B47F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19C00111-1328-4089-8565-94920B5B47F2}.Release|Any CPU.Build.0 = Release|Any CPU
{19C00111-1328-4089-8565-94920B5B47F2}.Verbose|Any CPU.ActiveCfg = Verbose|Any CPU
......@@ -84,6 +89,8 @@ Global
{6756F911-BD09-4226-B597-67871DEB8ED5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6756F911-BD09-4226-B597-67871DEB8ED5}.Log Output|Any CPU.ActiveCfg = Log Output|Any CPU
{6756F911-BD09-4226-B597-67871DEB8ED5}.Log Output|Any CPU.Build.0 = Log Output|Any CPU
{6756F911-BD09-4226-B597-67871DEB8ED5}.Mono|Any CPU.ActiveCfg = Mono|Any CPU
{6756F911-BD09-4226-B597-67871DEB8ED5}.Mono|Any CPU.Build.0 = Mono|Any CPU
{6756F911-BD09-4226-B597-67871DEB8ED5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6756F911-BD09-4226-B597-67871DEB8ED5}.Release|Any CPU.Build.0 = Release|Any CPU
{6756F911-BD09-4226-B597-67871DEB8ED5}.Verbose|Any CPU.ActiveCfg = Verbose|Any CPU
......@@ -92,6 +99,8 @@ Global
{7909952C-0F38-4E62-A7BA-1A77E1452FDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7909952C-0F38-4E62-A7BA-1A77E1452FDA}.Log Output|Any CPU.ActiveCfg = Release|Any CPU
{7909952C-0F38-4E62-A7BA-1A77E1452FDA}.Log Output|Any CPU.Build.0 = Release|Any CPU
{7909952C-0F38-4E62-A7BA-1A77E1452FDA}.Mono|Any CPU.ActiveCfg = Mono|Any CPU
{7909952C-0F38-4E62-A7BA-1A77E1452FDA}.Mono|Any CPU.Build.0 = Mono|Any CPU
{7909952C-0F38-4E62-A7BA-1A77E1452FDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7909952C-0F38-4E62-A7BA-1A77E1452FDA}.Release|Any CPU.Build.0 = Release|Any CPU
{7909952C-0F38-4E62-A7BA-1A77E1452FDA}.Verbose|Any CPU.ActiveCfg = Release|Any CPU
......@@ -100,6 +109,8 @@ Global
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}.Log Output|Any CPU.ActiveCfg = Release|Any CPU
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}.Log Output|Any CPU.Build.0 = Release|Any CPU
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}.Mono|Any CPU.ActiveCfg = Mono|Any CPU
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}.Mono|Any CPU.Build.0 = Mono|Any CPU
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}.Release|Any CPU.Build.0 = Release|Any CPU
{BE213DFB-5334-4441-B975-0DBCFD5F5A73}.Verbose|Any CPU.ActiveCfg = Release|Any CPU
......@@ -108,6 +119,8 @@ Global
{97B45B3A-34DB-43C3-A979-37F217390142}.Debug|Any CPU.Build.0 = Debug|Any CPU
{97B45B3A-34DB-43C3-A979-37F217390142}.Log Output|Any CPU.ActiveCfg = Release|Any CPU
{97B45B3A-34DB-43C3-A979-37F217390142}.Log Output|Any CPU.Build.0 = Release|Any CPU
{97B45B3A-34DB-43C3-A979-37F217390142}.Mono|Any CPU.ActiveCfg = Mono|Any CPU
{97B45B3A-34DB-43C3-A979-37F217390142}.Mono|Any CPU.Build.0 = Mono|Any CPU
{97B45B3A-34DB-43C3-A979-37F217390142}.Release|Any CPU.ActiveCfg = Release|Any CPU
{97B45B3A-34DB-43C3-A979-37F217390142}.Release|Any CPU.Build.0 = Release|Any CPU
{97B45B3A-34DB-43C3-A979-37F217390142}.Verbose|Any CPU.ActiveCfg = Release|Any CPU
......@@ -116,6 +129,8 @@ Global
{36CAC6B6-2B88-447F-AA35-D4DAA5E4F2C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36CAC6B6-2B88-447F-AA35-D4DAA5E4F2C7}.Log Output|Any CPU.ActiveCfg = Release|Any CPU
{36CAC6B6-2B88-447F-AA35-D4DAA5E4F2C7}.Log Output|Any CPU.Build.0 = Release|Any CPU
{36CAC6B6-2B88-447F-AA35-D4DAA5E4F2C7}.Mono|Any CPU.ActiveCfg = Mono|Any CPU
{36CAC6B6-2B88-447F-AA35-D4DAA5E4F2C7}.Mono|Any CPU.Build.0 = Mono|Any CPU
{36CAC6B6-2B88-447F-AA35-D4DAA5E4F2C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{36CAC6B6-2B88-447F-AA35-D4DAA5E4F2C7}.Release|Any CPU.Build.0 = Release|Any CPU
{36CAC6B6-2B88-447F-AA35-D4DAA5E4F2C7}.Verbose|Any CPU.ActiveCfg = Release|Any CPU
......@@ -124,6 +139,8 @@ Global
{EBF46088-E318-4D32-9EFB-01EF130A4554}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EBF46088-E318-4D32-9EFB-01EF130A4554}.Log Output|Any CPU.ActiveCfg = Log Output|Any CPU
{EBF46088-E318-4D32-9EFB-01EF130A4554}.Log Output|Any CPU.Build.0 = Log Output|Any CPU
{EBF46088-E318-4D32-9EFB-01EF130A4554}.Mono|Any CPU.ActiveCfg = Mono|Any CPU
{EBF46088-E318-4D32-9EFB-01EF130A4554}.Mono|Any CPU.Build.0 = Mono|Any CPU
{EBF46088-E318-4D32-9EFB-01EF130A4554}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EBF46088-E318-4D32-9EFB-01EF130A4554}.Release|Any CPU.Build.0 = Release|Any CPU
{EBF46088-E318-4D32-9EFB-01EF130A4554}.Verbose|Any CPU.ActiveCfg = Verbose|Any CPU
......@@ -132,6 +149,8 @@ Global
{75CED009-AAC6-4AC1-9C38-A0530619062D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{75CED009-AAC6-4AC1-9C38-A0530619062D}.Log Output|Any CPU.ActiveCfg = Release|Any CPU
{75CED009-AAC6-4AC1-9C38-A0530619062D}.Log Output|Any CPU.Build.0 = Release|Any CPU
{75CED009-AAC6-4AC1-9C38-A0530619062D}.Mono|Any CPU.ActiveCfg = Mono|Any CPU
{75CED009-AAC6-4AC1-9C38-A0530619062D}.Mono|Any CPU.Build.0 = Mono|Any CPU
{75CED009-AAC6-4AC1-9C38-A0530619062D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{75CED009-AAC6-4AC1-9C38-A0530619062D}.Release|Any CPU.Build.0 = Release|Any CPU
{75CED009-AAC6-4AC1-9C38-A0530619062D}.Verbose|Any CPU.ActiveCfg = Release|Any CPU
......
......@@ -62,6 +62,17 @@
<PropertyGroup>
<AssemblyOriginatorKeyFile>StackExchange.Redis.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono|AnyCPU'">
<OutputPath>bin\Mono\</OutputPath>
<DefineConstants>TRACE;STRONG_NAME</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>bin.snk\Release\StackExchange.Redis.StrongName.xml</DocumentationFile>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
......
......@@ -56,6 +56,17 @@
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono|AnyCPU'">
<OutputPath>bin\Mono\</OutputPath>
<DefineConstants>TRACE;__MonoCS__</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>bin\Release\StackExchange.Redis.xml</DocumentationFile>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
......
......@@ -141,41 +141,7 @@ private void Read()
if (weAreReader) Interlocked.Exchange(ref readerCount, 0);
}
}
internal enum ManagerState
{
Inactive,
Preparing,
Faulted,
CheckForHeartbeat,
ExecuteHeartbeat,
LocateActiveSockets,
NoSocketsPause,
PrepareActiveSockets,
CullDeadSockets,
NoActiveSocketsPause,
GrowingSocketArray,
CopyingPointersForSelect,
ExecuteSelect,
ExecuteSelectComplete,
CheckForStaleConnections,
RecordConnectionFailed_OnInternalError,
RecordConnectionFailed_OnDisconnected,
RecordConnectionFailed_ReportFailure,
RecordConnectionFailed_OnConnectionFailed,
RecordConnectionFailed_FailOutstanding,
RecordConnectionFailed_ShutdownSocket,
CheckForStaleConnectionsDone,
EnqueueRead,
EnqueueError,
EnqueueReadFallback,
RequestAssistance,
ProcessQueues,
ProcessReadQueue,
ProcessErrorQueue,
}
internal ManagerState State
{
get { return managerState; }
......@@ -304,7 +270,9 @@ private void ReadImpl()
}
else
{
#pragma warning disable 0420
s.CheckForStaleConnection(ref managerState);
#pragma warning restore 0420
}
}
managerState = ManagerState.CheckForStaleConnectionsDone;
......
......@@ -64,6 +64,41 @@ public SocketToken(Socket socket)
/// </summary>
public sealed partial class SocketManager : IDisposable
{
internal enum ManagerState
{
Inactive,
Preparing,
Faulted,
CheckForHeartbeat,
ExecuteHeartbeat,
LocateActiveSockets,
NoSocketsPause,
PrepareActiveSockets,
CullDeadSockets,
NoActiveSocketsPause,
GrowingSocketArray,
CopyingPointersForSelect,
ExecuteSelect,
ExecuteSelectComplete,
CheckForStaleConnections,
RecordConnectionFailed_OnInternalError,
RecordConnectionFailed_OnDisconnected,
RecordConnectionFailed_ReportFailure,
RecordConnectionFailed_OnConnectionFailed,
RecordConnectionFailed_FailOutstanding,
RecordConnectionFailed_ShutdownSocket,
CheckForStaleConnectionsDone,
EnqueueRead,
EnqueueError,
EnqueueReadFallback,
RequestAssistance,
ProcessQueues,
ProcessReadQueue,
ProcessErrorQueue,
}
private static readonly ParameterizedThreadStart writeAllQueues = context =>
{
try { ((SocketManager)context).WriteAllQueues(); } catch { }
......
......@@ -41,6 +41,18 @@
<PropertyGroup>
<AssemblyOriginatorKeyFile>StackExchange.Redis.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono|AnyCPU'">
<OutputPath>bin\Mono\</OutputPath>
<DefineConstants>TRACE;NET40 STRONG_NAME</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>bin.snk\Release\StackExchange.Redis.StrongName.xml</DocumentationFile>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Threading.Tasks">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
......
......@@ -35,6 +35,18 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>bin\Release\StackExchange.Redis.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Mono|AnyCPU'">
<OutputPath>bin\Mono\</OutputPath>
<DefineConstants>TRACE;NET40</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>bin\Release\StackExchange.Redis.xml</DocumentationFile>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Threading.Tasks">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.dll</HintPath>
......
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