IRunnable.cs 654 B

12345678910111213141516171819202122232425
  1. namespace Abp.Threading
  2. {
  3. /// <summary>
  4. /// Interface to start/stop self threaded services.
  5. /// </summary>
  6. public interface IRunnable
  7. {
  8. /// <summary>
  9. /// Starts the service.
  10. /// </summary>
  11. void Start();
  12. /// <summary>
  13. /// Sends stop command to the service.
  14. /// Service may return immediately and stop asynchronously.
  15. /// A client should then call <see cref="WaitToStop"/> method to ensure it's stopped.
  16. /// </summary>
  17. void Stop();
  18. /// <summary>
  19. /// Waits the service to stop.
  20. /// </summary>
  21. void WaitToStop();
  22. }
  23. }