Index: branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/EvaluationCache.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/EvaluationCache.cs	(revision 17317)
+++ branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/EvaluationCache.cs	(revision 17320)
@@ -31,4 +31,5 @@
 using System.Threading;
 using Google.ProtocolBuffers;
+using HEAL.Attic;
 using HeuristicLab.Common;
 using HeuristicLab.Common.Resources;
@@ -36,5 +37,4 @@
 using HeuristicLab.Data;
 using HeuristicLab.Parameters;
-using HEAL.Attic;
 
 namespace HeuristicLab.Problems.ExternalEvaluation {
@@ -50,5 +50,5 @@
       private byte[] rawMessage;
 
-      private object lockObject = new object();
+      private readonly object lockObject = new object();
 
       public byte[] RawMessage {
@@ -116,5 +116,5 @@
     }
 
-    public delegate QualityMessage Evaluator(SolutionMessage message);
+    public delegate QualityMessage Evaluator(SolutionMessage message, CancellationToken cancellationToken);
     #endregion
 
@@ -124,5 +124,5 @@
 
     private HashSet<string> activeEvaluations = new HashSet<string>();
-    private object cacheLock = new object();
+    private readonly object cacheLock = new object();
     #endregion
 
@@ -221,5 +221,5 @@
     }
 
-    void CapacityChanged(object sender, EventArgs e) {
+    private void CapacityChanged(object sender, EventArgs e) {
       if (Capacity < 0)
         throw new ArgumentOutOfRangeException("Cache capacity cannot be less than zero");
@@ -240,5 +240,5 @@
     }
 
-    public QualityMessage GetValue(SolutionMessage message, Evaluator evaluate, ExtensionRegistry extensions) {
+    public QualityMessage GetValue(SolutionMessage message, Evaluator evaluate, ExtensionRegistry extensions, CancellationToken cancellationToken) {
       var entry = new CacheEntry(message.ToString());
       bool lockTaken = false;
@@ -267,5 +267,5 @@
               OnChanged();
               try {
-                entry.SetMessage(evaluate(message));
+                entry.SetMessage(evaluate(message, cancellationToken));
                 Monitor.Enter(cacheLock, ref lockTaken);
                 index[entry] = list.AddLast(entry);
Index: branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/Interfaces/IExternalEvaluationProblem.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/Interfaces/IExternalEvaluationProblem.cs	(revision 17317)
+++ branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/Interfaces/IExternalEvaluationProblem.cs	(revision 17320)
@@ -20,8 +20,9 @@
 #endregion
 
+using System.Threading;
 using Google.ProtocolBuffers;
+using HEAL.Attic;
 using HeuristicLab.Core;
 using HeuristicLab.Optimization;
-using HEAL.Attic;
 
 namespace HeuristicLab.Problems.ExternalEvaluation {
@@ -32,5 +33,5 @@
     CheckedItemCollection<IEvaluationServiceClient> Clients { get; }
 
-    QualityMessage Evaluate(SolutionMessage solutionMessage);
+    QualityMessage Evaluate(SolutionMessage solutionMessage, CancellationToken cancellationToken);
     ExtensionRegistry GetQualityMessageExtensions();
   }
Index: branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/MultiObjectiveExternalEvaluationProblem.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/MultiObjectiveExternalEvaluationProblem.cs	(revision 17317)
+++ branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/MultiObjectiveExternalEvaluationProblem.cs	(revision 17320)
@@ -106,14 +106,14 @@
     }
 
-    public override double[] Evaluate(TEncodedSolution individual, IRandom random) {
-      var qualityMessage = Evaluate(BuildSolutionMessage(individual));
+    public override double[] Evaluate(TEncodedSolution individual, IRandom random, CancellationToken cancellationToken) {
+      var qualityMessage = Evaluate(BuildSolutionMessage(individual), cancellationToken);
       if (!qualityMessage.HasExtension(MultiObjectiveQualityMessage.QualityMessage_))
         throw new InvalidOperationException("The received message is not a MultiObjectiveQualityMessage.");
       return qualityMessage.GetExtension(MultiObjectiveQualityMessage.QualityMessage_).QualitiesList.ToArray();
     }
-    public virtual QualityMessage Evaluate(SolutionMessage solutionMessage) {
+    public virtual QualityMessage Evaluate(SolutionMessage solutionMessage, CancellationToken cancellationToken) {
       return Cache == null
-        ? EvaluateOnNextAvailableClient(solutionMessage)
-        : Cache.GetValue(solutionMessage, EvaluateOnNextAvailableClient, GetQualityMessageExtensions());
+        ? EvaluateOnNextAvailableClient(solutionMessage, cancellationToken)
+        : Cache.GetValue(solutionMessage, EvaluateOnNextAvailableClient, GetQualityMessageExtensions(), cancellationToken);
     }
 
@@ -132,7 +132,7 @@
     #region Evaluation
     private HashSet<IEvaluationServiceClient> activeClients = new HashSet<IEvaluationServiceClient>();
-    private object clientLock = new object();
+    private readonly object clientLock = new object();
 
-    private QualityMessage EvaluateOnNextAvailableClient(SolutionMessage message) {
+    private QualityMessage EvaluateOnNextAvailableClient(SolutionMessage message, CancellationToken cancellationToken) {
       IEvaluationServiceClient client = null;
       lock (clientLock) {
@@ -147,6 +147,5 @@
       try {
         return client.Evaluate(message, GetQualityMessageExtensions());
-      }
-      finally {
+      } finally {
         lock (clientLock) {
           activeClients.Remove(client);
@@ -165,6 +164,5 @@
           try {
             MessageBuilder.AddToMessage(variable.Value, variable.Name, protobufBuilder);
-          }
-          catch (ArgumentException ex) {
+          } catch (ArgumentException ex) {
             throw new InvalidOperationException(string.Format("ERROR while building solution message: Parameter {0} cannot be added to the message", Name), ex);
           }
Index: branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/SingleObjectiveExternalEvaluationProblem.cs
===================================================================
--- branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/SingleObjectiveExternalEvaluationProblem.cs	(revision 17317)
+++ branches/2521_ProblemRefactoring/HeuristicLab.Problems.ExternalEvaluation/3.4/SingleObjectiveExternalEvaluationProblem.cs	(revision 17320)
@@ -103,14 +103,14 @@
 
     #region Single Objective Problem Overrides
-    public override double Evaluate(TEncodedSolution solution, IRandom random) {
-      var qualityMessage = Evaluate(BuildSolutionMessage(solution));
+    public override double Evaluate(TEncodedSolution solution, IRandom random, CancellationToken cancellationToken) {
+      var qualityMessage = Evaluate(BuildSolutionMessage(solution), cancellationToken);
       if (!qualityMessage.HasExtension(SingleObjectiveQualityMessage.QualityMessage_))
         throw new InvalidOperationException("The received message is not a SingleObjectiveQualityMessage.");
       return qualityMessage.GetExtension(SingleObjectiveQualityMessage.QualityMessage_).Quality;
     }
-    public virtual QualityMessage Evaluate(SolutionMessage solutionMessage) {
+    public virtual QualityMessage Evaluate(SolutionMessage solutionMessage, CancellationToken cancellationToken) {
       return Cache == null
-        ? EvaluateOnNextAvailableClient(solutionMessage)
-        : Cache.GetValue(solutionMessage, EvaluateOnNextAvailableClient, GetQualityMessageExtensions());
+        ? EvaluateOnNextAvailableClient(solutionMessage,cancellationToken)
+        : Cache.GetValue(solutionMessage, EvaluateOnNextAvailableClient, GetQualityMessageExtensions(), cancellationToken);
     }
 
@@ -132,7 +132,7 @@
     #region Evaluation
     private HashSet<IEvaluationServiceClient> activeClients = new HashSet<IEvaluationServiceClient>();
-    private object clientLock = new object();
+    private readonly object clientLock = new object();
 
-    private QualityMessage EvaluateOnNextAvailableClient(SolutionMessage message) {
+    private QualityMessage EvaluateOnNextAvailableClient(SolutionMessage message, CancellationToken cancellationToken) {
       IEvaluationServiceClient client = null;
       lock (clientLock) {
