Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/12/15 17:04:39 (9 years ago)
Author:
dglaser
Message:

#2388: Restored files/settings from old HiveStatistics branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.JanitorService/3.3/JanitorService.cs

    r12012 r12441  
    2626  public partial class JanitorService : ServiceBase {
    2727    private HiveJanitor janitor;
    28     private Thread janitorThread;
     28    private Thread janitorCleanupThread;
     29    private Thread janitorGenerateStatisticsThread;
    2930
    3031    public JanitorService() {
     
    3536      janitor = new HiveJanitor();
    3637
    37       janitorThread = new Thread(janitor.Run);
    38       janitorThread.IsBackground = true; //dont keep app alive
    39       janitorThread.Start();
     38      janitorCleanupThread = new Thread(janitor.RunCleanup) {
     39        IsBackground = true
     40      };
     41      janitorGenerateStatisticsThread = new Thread(janitor.RunGenerateStatistics) {
     42        IsBackground = true
     43      };
     44
     45      janitorCleanupThread.Start();
     46      janitorGenerateStatisticsThread.Start();
    4047    }
    4148
    4249    protected override void OnStop() {
    4350      janitor.StopJanitor();
    44       janitorThread.Join();
     51      janitorCleanupThread.Join();
     52      janitorGenerateStatisticsThread.Join();
    4553    }
    4654  }
Note: See TracChangeset for help on using the changeset viewer.