I am running into a problem with using async. I get a deadlock every few days and I have a feeling it has to do with something in the below code chunk. Does the code look like async best practice or does something stand out that would cause a deadlock?
public async void Speak() { this.timer1.Stop(); if (listBox2.SelectedIndex > -1) { string Name = (string)this.listBox2.SelectedItem; selectedVoice = Name; } await Task.Run (() => { Work( selectedVoice); }); if(Started) { TotalTime = pElapsedTime; TimeLeft = pElapsedTime; this.label3.Text = TotalTime.ToString() + " Seconds"; this.timer1.Start(); } }