IThreadSignaler.cs 770 B

123456789101112131415161718192021222324
  1. using Best.HTTP.Shared.Logger;
  2. namespace Best.HTTP.Hosts.Connections
  3. {
  4. /// <summary>
  5. /// Interface for signaling upload threads.
  6. /// </summary>
  7. public interface IThreadSignaler
  8. {
  9. /// <summary>
  10. /// A <see cref="LoggingContext"/> instance for debugging purposes.
  11. /// </summary>
  12. /// <remarks>
  13. /// To help <see cref="Best.HTTP.Request.Upload.UploadStreamBase"/> implementors log in the IThreadSignaler's context,
  14. /// the interface implementors must make their logging context accessible.
  15. /// </remarks>
  16. public LoggingContext Context { get; }
  17. /// <summary>
  18. /// Signals the associated thread to resume or wake up.
  19. /// </summary>
  20. void SignalThread();
  21. }
  22. }