This commit is contained in:
2026-06-15 18:18:16 +08:00
parent 97c9fba14e
commit 2b9f134e5f
4164 changed files with 386922 additions and 79 deletions

View File

@@ -0,0 +1,30 @@
using Best.HTTP.Shared.Logger;
namespace Best.HTTP.Hosts.Connections
{
public enum SignalHandlerTypes
{
Signal,
InlineIfPossible
}
/// <summary>
/// Interface for signaling upload threads.
/// </summary>
public interface IThreadSignaler
{
/// <summary>
/// A <see cref="LoggingContext"/> instance for debugging purposes.
/// </summary>
/// <remarks>
/// To help <see cref="Best.HTTP.Request.Upload.UploadStreamBase"/> implementors log in the IThreadSignaler's context,
/// the interface implementors must make their logging context accessible.
/// </remarks>
public LoggingContext Context { get; }
/// <summary>
/// Signals the associated thread to resume or wake up.
/// </summary>
void SignalThread(SignalHandlerTypes signalType = SignalHandlerTypes.Signal);
}
}