Skip to content

Commit

Permalink
Add IWorker
Browse files Browse the repository at this point in the history
  • Loading branch information
geoperez committed Dec 14, 2017
1 parent 6329830 commit 5073b17
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/Unosquare.Swan.Lite/Abstractions/IWorker.cs
@@ -0,0 +1,18 @@
namespace Unosquare.Swan.Abstractions
{
/// <summary>
/// A simple interface for application workers
/// </summary>
public interface IWorker
{
/// <summary>
/// Should start the task immediately and asynchronously
/// </summary>
void Start();

/// <summary>
/// Should stop the task immediately and synchronously
/// </summary>
void Stop();
}
}
3 changes: 2 additions & 1 deletion src/Unosquare.Swan/Abstractions/AppWorkerBase.cs
Expand Up @@ -7,7 +7,8 @@
/// <summary>
/// A base implementation of an Application service containing a worker task that performs background processing.
/// </summary>
public abstract class AppWorkerBase
public abstract class AppWorkerBase
: IWorker
{
#region Property Backing

Expand Down

0 comments on commit 5073b17

Please sign in to comment.