Changeset 1655 for trunk/sources/HeuristicLab.Hive.JobBase/3.2/JobBase.cs
- Timestamp:
- 04/24/09 14:35:35 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.JobBase/3.2/JobBase.cs
r1530 r1655 34 34 private Thread thread = null; 35 35 public event EventHandler JobStopped; 36 public event EventHandler JobFailed; 36 37 37 38 public long JobId { get; set; } … … 42 43 43 44 abstract public void Run(); 45 private void SecureRun() { 46 try { 47 Run(); 48 } 49 catch (Exception ex) { 50 if (JobFailed != null) 51 JobFailed(this, new EventArgs()); 52 } 53 } 44 54 45 55 public void Start() { 46 thread = new Thread(new ThreadStart(Run)); 56 thread = new Thread(new ThreadStart(Run)); 47 57 thread.Start(); 48 58 Running = true;
Note: See TracChangeset
for help on using the changeset viewer.