Commits

Anonymous committed 72658bf Merge

Merge with default

Comments (0)

Files changed (3)

ConsoleApplication2/App.config

-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0"?>
 <configuration>
     <startup> 
-        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
     </startup>
-</configuration>
+</configuration>

ConsoleApplication2/ConsoleApplication2.csproj

     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>ConsoleApplication2</RootNamespace>
     <AssemblyName>ConsoleApplication2</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
+    <TargetFrameworkProfile />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>

ConsoleApplication2/Program.cs

 
         static void Main(string[] args)
         {
+            for (int i = 0; i < Environment.ProcessorCount/2; i++)
+            {
+                Go();
+            }
+        }
+
+        private static void Go()
+        {
             ConcurrentQueue<long> queue = new ConcurrentQueue<long>();
             Thread producer = new Thread(() => Producer(queue));
             Thread consumer = new Thread(() => Consumer(queue));
+
             producer.Start();
             consumer.Start();
         }
                     Console.WriteLine("Bugged");
                 }
                 expected++;
-                if (expected % 10000000 == 0)
+                if (expected % 100000000 == 0)
                 {
                     Console.WriteLine(expected);
                 }