- Timestamp:
- 09/21/15 16:28:38 (9 years ago)
- Location:
- stable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Services.Hive.JanitorService/3.3/JanitorService.cs
r12009 r12962 26 26 public partial class JanitorService : ServiceBase { 27 27 private HiveJanitor janitor; 28 private Thread janitorThread; 28 private Thread janitorCleanupThread; 29 private Thread janitorGenerateStatisticsThread; 29 30 30 31 public JanitorService() { … … 35 36 janitor = new HiveJanitor(); 36 37 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(); 40 47 } 41 48 42 49 protected override void OnStop() { 43 50 janitor.StopJanitor(); 44 janitorThread.Join(); 51 janitorCleanupThread.Join(); 52 janitorGenerateStatisticsThread.Join(); 45 53 } 46 54 }
Note: See TracChangeset
for help on using the changeset viewer.