ハードウェアの状態を監視する必要がある場合は、実行時間の長いバックグラウンド スレッドを使用するのが理にかなっていると思います。TaskCreationOptions.LongRunningは適切に見えます。
また、C# の新しい async/await 機能を使用してデバイスと非同期的に対話することは、私にとって理にかなっています。それが役立つかどうかはわかりませんが、ハードウェアの相互作用を通常どのように処理するかを示すスニペットを次に示します (私にとっては、多くの場合、WinUSB デバイスです)。
class Controller : IDisposable // to dispose the unmanaged resources related to the hardware
{
// this will be used to call back to the UI
private static readonly SynchronizationContext DefaultContext = new SynchronizationContext();
public Controller()
{
Task.Factory.StartNew(this.Monitor, ct, TaskCreationOptions.LongRunning);
}
public async Task<Result> ActionOnHardwareAsync(object parameter)
{
// you may need to synchronize with the monitor method here.
}
// This method monitors hw status, calling back to the UI when something happens
private void Monitor(object state)
{
// Do some stuffs...
this.synchronizationContext.Post(~ your SendOrPostCallback here ~, ~ event from the hw ~);
}
}