Permalink
Browse files

Allow threaded services to indicate whether they are a background ser…

…vice
  • Loading branch information...
1 parent a2d19f0 commit 695e9763d0f371cba848517806ad85c0a21703df @cdhowie committed Jan 3, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 Cdh.Toolkit.Services/ThreadedService.cs
@@ -44,6 +44,8 @@ public abstract class ThreadedService : IService
private Thread thread = null;
+ protected abstract bool IsBackgroundService { get; }
+
#region IService Members
public virtual void Start()
@@ -54,6 +56,7 @@ public virtual void Start()
return;
thread = new Thread(ThreadEntryPoint);
+ thread.IsBackground = IsBackgroundService;
IsRunning = true;
ThreadRunning = true;

0 comments on commit 695e976

Please sign in to comment.