From 82b9529b194e7e789e4ee128129bb7dd831a1869 Mon Sep 17 00:00:00 2001 From: Gustavo Martin Date: Tue, 27 May 2014 06:44:36 +0200 Subject: [PATCH] Threads project: Windows 8 version --- Allgemeines/Threads/Threads.Windows8.sln | 22 +++++++ Allgemeines/Threads/Threads/App.config | 6 ++ Allgemeines/Threads/Threads/Program.cs | 5 ++ .../Threads/Threads/Threads.Windows8.csproj | 68 ++++++++++++++++++++++ 4 files changed, 101 insertions(+) create mode 100644 Allgemeines/Threads/Threads.Windows8.sln create mode 100644 Allgemeines/Threads/Threads/App.config create mode 100644 Allgemeines/Threads/Threads/Threads.Windows8.csproj diff --git a/Allgemeines/Threads/Threads.Windows8.sln b/Allgemeines/Threads/Threads.Windows8.sln new file mode 100644 index 0000000..6b93127 --- /dev/null +++ b/Allgemeines/Threads/Threads.Windows8.sln @@ -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 index 0000000..9c05822 --- /dev/null +++ b/Allgemeines/Threads/Threads/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Allgemeines/Threads/Threads/Program.cs b/Allgemeines/Threads/Threads/Program.cs index 05aa71b..423db86 100644 --- a/Allgemeines/Threads/Threads/Program.cs +++ b/Allgemeines/Threads/Threads/Program.cs @@ -27,6 +27,8 @@ namespace Threads var tree = new Threads.Chapter6.Tree(); // 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 index 0000000..34d655e --- /dev/null +++ b/Allgemeines/Threads/Threads/Threads.Windows8.csproj @@ -0,0 +1,68 @@ + + + + + Debug + AnyCPU + {6A854EA3-49BD-4382-9EBF-C105C5CED114} + Exe + Properties + Threads.Windows8 + Threads.Windows8 + v4.5.1 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + Threads.MainClass + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- 2.1.4