Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Hive.Client.Common/JobBase.cs @ 753

Last change on this file since 753 was 749, checked in by kgrading, 16 years ago

startet #358

File size: 707 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading;
6
7namespace HeuristicLab.Hive.Client.Common {
8
9  public delegate void Callback();
10
11  abstract public class JobBase {
12
13    public event Callback JobAborted;
14
15    private Thread thread = null;
16   
17    public int Progress { get; set; }
18    private bool abort = false;
19    private bool running = false;
20
21    abstract public void Run();
22
23    public void Start() {
24      thread = new Thread(new ThreadStart(Run));
25      thread.Start();
26      running = true;
27    }
28
29    public void Stop() {
30      abort = true;       
31    }
32
33    public JobBase() {   
34    }
35  }
36}
Note: See TracBrowser for help on using the repository browser.