Index: trunk/sources/HeuristicLab/3.3/Tests/AlgorithmExtensions.cs
===================================================================
--- trunk/sources/HeuristicLab/3.3/Tests/AlgorithmExtensions.cs	(revision 6205)
+++ trunk/sources/HeuristicLab/3.3/Tests/AlgorithmExtensions.cs	(revision 6205)
@@ -0,0 +1,78 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Threading;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab_33.Tests {
+  public static class AlgorithmExtensions {
+    public static void StartSync(this IAlgorithm algorithm, CancellationToken cancellationToken) {
+      var executor = new AlgorithmExecutor(algorithm, cancellationToken);
+      executor.StartSync();
+    }
+  }
+
+  /// <summary>
+  /// Can execute an algorithm synchronously
+  /// </summary>
+  internal class AlgorithmExecutor {
+    private IAlgorithm algorithm;
+    private AutoResetEvent waitHandle = new AutoResetEvent(false);
+    private CancellationToken cancellationToken;
+
+    public AlgorithmExecutor(IAlgorithm algorithm, CancellationToken cancellationToken) {
+      this.algorithm = algorithm;
+      this.cancellationToken = cancellationToken;
+    }
+
+    public void StartSync() {
+      algorithm.Stopped += new EventHandler(algorithm_Stopped);
+      algorithm.Paused += new EventHandler(algorithm_Paused);
+
+      using (CancellationTokenRegistration registration = cancellationToken.Register(new Action(cancellationToken_Canceled))) {
+        algorithm.Start();
+        waitHandle.WaitOne();
+        waitHandle.Dispose();
+      }
+
+      algorithm.Stopped -= new EventHandler(algorithm_Stopped);
+      algorithm.Paused -= new EventHandler(algorithm_Paused);
+      if (algorithm.ExecutionState == ExecutionState.Started) {
+        algorithm.Pause();
+      }
+      cancellationToken.ThrowIfCancellationRequested();
+    }
+
+    private void algorithm_Paused(object sender, EventArgs e) {
+      waitHandle.Set();
+    }
+
+    private void algorithm_Stopped(object sender, EventArgs e) {
+      waitHandle.Set();
+    }
+
+    private void cancellationToken_Canceled() {
+      waitHandle.Set();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab/3.3/Tests/CollectObjectGraphTest.cs
===================================================================
--- trunk/sources/HeuristicLab/3.3/Tests/CollectObjectGraphTest.cs	(revision 6201)
+++ trunk/sources/HeuristicLab/3.3/Tests/CollectObjectGraphTest.cs	(revision 6205)
@@ -24,7 +24,12 @@
 using System.Diagnostics;
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Algorithms.GeneticAlgorithm;
 using HeuristicLab.Common;
+using HeuristicLab.Optimization;
 using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.TestFunctions;
+using HeuristicLab.Random;
+using HeuristicLab.SequentialEngine;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
 
@@ -82,4 +87,28 @@
       TestContext.WriteLine("");
     }
+
+    [TestMethod]
+    public void AlgorithmExecutions() {
+      var random = new MersenneTwister(0);
+      var algs = new List<IAlgorithm>();
+
+      Stopwatch sw = new Stopwatch();
+      for (int i = 0; i < 100; i++) {
+        GeneticAlgorithm ga = new GeneticAlgorithm();
+        ga.PopulationSize.Value = 5;
+        ga.MaximumGenerations.Value = 5;
+        ga.Engine = new SequentialEngine();
+        ga.Problem = new SingleObjectiveTestFunctionProblem();
+
+        sw.Start();
+        algs.Add(ga);
+
+        var cancellationTokenSource = new CancellationTokenSource();
+        ga.StartSync(cancellationTokenSource.Token);
+        sw.Stop();
+        TestContext.WriteLine("{0}: {1} ", i, sw.Elapsed);
+        sw.Reset();
+      }
+    }
   }
 }
Index: trunk/sources/HeuristicLab/3.3/Tests/HeuristicLab-3.3.Tests.csproj
===================================================================
--- trunk/sources/HeuristicLab/3.3/Tests/HeuristicLab-3.3.Tests.csproj	(revision 6201)
+++ trunk/sources/HeuristicLab/3.3/Tests/HeuristicLab-3.3.Tests.csproj	(revision 6205)
@@ -122,4 +122,5 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="AlgorithmExtensions.cs" />
     <Compile Include="CloningConstructorTest.cs" />
     <Compile Include="CollectObjectGraphTest.cs" />
@@ -559,4 +560,7 @@
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </None>
+    <None Include="GA_SymbReg2.hl">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
