Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs	(revision 6200)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs	(revision 6202)
@@ -443,5 +443,5 @@
 
     private static object startInAppDomainLocker = new object();
-
+    private static Mutex startInAppDomainMutex = new Mutex();
     /// <summary>
     /// A new Job from the wcfService has been received and will be started within a AppDomain.
@@ -451,5 +451,7 @@
       clientCom.StatusChanged(ConfigManager.Instance.GetStatusForClientConsole());
 
-      lock (startInAppDomainLocker) {
+      startInAppDomainMutex.WaitOne(); // mutex is used instead of lock to be able to release it before executor.Start() is called (which may take long time)
+      bool released = false;
+
         if (executors.ContainsKey(job.Id)) {
           clientCom.LogMessage("Job with key " + job.Id + " already exists. Job will be ignored.");
@@ -488,9 +490,17 @@
             clientCom.LogMessage("Starting Executor for job " + job.Id);
             lock (executors) {
+              if (executors.ContainsKey(job.Id)) {
+                throw new JobAlreadyExistsException(job.Id);
+              }
               executors.Add(job.Id, executor);
             }
+            startInAppDomainMutex.ReleaseMutex();
+            released = true;
             semaphores[job.Id] = new Semaphore(0, 1);
             executor.Start(jobData.Data);
             semaphores[job.Id].Release();
+          }
+          catch (JobAlreadyExistsException e) {
+            clientCom.LogMessage(string.Format("Job {0} has already been started. Job will be ignored", e.JobId));
           }
           catch (Exception exception) {
@@ -507,6 +517,8 @@
             KillAppDomain(job.Id);
           }
-        }
-      }
+
+          if (!released)
+            startInAppDomainMutex.ReleaseMutex();
+        }
       heartbeatManager.AwakeHeartBeatThread();
     }
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Exceptions/JobAlreadyExistsException.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Exceptions/JobAlreadyExistsException.cs	(revision 6202)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Exceptions/JobAlreadyExistsException.cs	(revision 6202)
@@ -0,0 +1,11 @@
+﻿using System;
+
+namespace HeuristicLab.Clients.Hive.SlaveCore {
+  class JobAlreadyExistsException : Exception {
+    public Guid JobId { get; set; }
+
+    public JobAlreadyExistsException(Guid jobId) {
+      this.JobId = jobId;
+    }
+  }
+}
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/HeuristicLab.Clients.Hive.Slave-3.4.csproj
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/HeuristicLab.Clients.Hive.Slave-3.4.csproj	(revision 6200)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/HeuristicLab.Clients.Hive.Slave-3.4.csproj	(revision 6202)
@@ -100,4 +100,5 @@
     <Compile Include="Exceptions\JobNotFoundException.cs" />
     <Compile Include="Exceptions\JobNotDataFoundException.cs" />
+    <Compile Include="Exceptions\JobAlreadyExistsException.cs" />
     <Compile Include="SlaveClientCom.cs" />
     <Compile Include="Core.cs" />
Index: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/SlaveStatusInfo.cs
===================================================================
--- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/SlaveStatusInfo.cs	(revision 6200)
+++ branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/SlaveStatusInfo.cs	(revision 6202)
@@ -27,5 +27,5 @@
     static public int JobsAborted { get; set; }
     static public int JobsFetched { get; set; }
-    static public DateTime LoginTime { get; set; }            
+    static public DateTime LoginTime { get; set; }
   }
 }
