using System; namespace PepperDash.Essentials.Core.Tests.Abstractions { /// /// Abstraction for thread operations to enable testing /// public interface IThreadService { /// /// Sleeps the current thread for the specified milliseconds /// /// Time to sleep in milliseconds void Sleep(int milliseconds); /// /// Creates and starts a new thread /// /// The function to execute in the thread /// Parameter to pass to the thread function /// Thread identifier or handle object CreateAndStartThread(Func threadFunction, object parameter); /// /// Aborts the specified thread /// /// The thread to abort void AbortThread(object thread); /// /// Checks if the thread is currently running /// /// The thread to check /// True if the thread is running, false otherwise bool IsThreadRunning(object thread); } }