Threads project: Windows 8 version
authorGustavo Martin <gu.martinm@gmail.com>
Tue, 27 May 2014 04:44:36 +0000 (06:44 +0200)
committerGustavo Martin <gu.martinm@gmail.com>
Tue, 27 May 2014 04:44:36 +0000 (06:44 +0200)
Allgemeines/Threads/Threads.Windows8.sln [new file with mode: 0644]
Allgemeines/Threads/Threads/App.config [new file with mode: 0644]
Allgemeines/Threads/Threads/Program.cs
Allgemeines/Threads/Threads/Threads.Windows8.csproj [new file with mode: 0644]

diff --git a/Allgemeines/Threads/Threads.Windows8.sln b/Allgemeines/Threads/Threads.Windows8.sln
new file mode 100644 (file)
index 0000000..6b93127
--- /dev/null
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.30110.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Threads", "Threads\Threads.Windows8.csproj", "{6A854EA3-49BD-4382-9EBF-C105C5CED114}"
+EndProject
+Global
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution
+               Debug|Any CPU = Debug|Any CPU
+               Release|Any CPU = Release|Any CPU
+       EndGlobalSection
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {6A854EA3-49BD-4382-9EBF-C105C5CED114}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {6A854EA3-49BD-4382-9EBF-C105C5CED114}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {6A854EA3-49BD-4382-9EBF-C105C5CED114}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {6A854EA3-49BD-4382-9EBF-C105C5CED114}.Release|Any CPU.Build.0 = Release|Any CPU
+       EndGlobalSection
+       GlobalSection(SolutionProperties) = preSolution
+               HideSolutionNode = FALSE
+       EndGlobalSection
+EndGlobal
diff --git a/Allgemeines/Threads/Threads/App.config b/Allgemeines/Threads/Threads/App.config
new file mode 100644 (file)
index 0000000..9c05822
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
+    </startup>
+</configuration>
\ No newline at end of file
index 05aa71b..423db86 100644 (file)
@@ -27,6 +27,8 @@ namespace Threads
             var tree = new Threads.Chapter6.Tree<int>();
             // WITH 10 LEVELS MONO STOPS WORKING WITH 806 THREADS!!!! (in my machine with 6GB RAM)
             // DUNNO WHAT MAKES THE MONO VIRTUAL MACHINE STOP... :(
+            // Using Windows 8 with Visual Studio Professional 2013 it works as expected. :(
+            // What is wrong with my Mono? (My Mono version was built my me)
             var levels = 10;
             chapter6.FillTree(levels, tree, () => 40);
 
@@ -36,7 +38,10 @@ namespace Threads
             Console.WriteLine("Parallel Walk");
             // In my case the parallel walk is slower than the sequential one because the tasks are short and
             // we waste more time creating new threads and synchronizing than running these simple tasks.
+            // IT IS NOT THE CASE IN WINDOWS 8!!!!! Using Windows 8 the parallel version is faster than the sequential one.
+            // What is wrong with my Mono? (My Mono version was built my me)
             chapter6.ParallelWalk(tree, (data, level) => Console.WriteLine("Level: {0} Data: {1}", level, data));
+            Console.Read();
         }
     }
 }
diff --git a/Allgemeines/Threads/Threads/Threads.Windows8.csproj b/Allgemeines/Threads/Threads/Threads.Windows8.csproj
new file mode 100644 (file)
index 0000000..34d655e
--- /dev/null
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{6A854EA3-49BD-4382-9EBF-C105C5CED114}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Threads.Windows8</RootNamespace>
+    <AssemblyName>Threads.Windows8</AssemblyName>
+    <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup>
+    <StartupObject>Threads.MainClass</StartupObject>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Chapter1.cs" />
+    <Compile Include="Chapter2.cs" />
+    <Compile Include="Chapter3.cs" />
+    <Compile Include="Chapter4.cs" />
+    <Compile Include="Chapter5.cs" />
+    <Compile Include="Chapter6.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file