public void PauseStream() { if (_currentStreamTask != null) { _currentStreamTask.Pause(); } }
public void PauseStream() { lock (_lockStream) { _currentStreamTask?.Pause(); } }