avoid calling Thread.Join from finalizer

cosmonaut 2023-11-20 17:59:26 -08:00
parent 40fb313d12
commit 772a0378bb
1 changed files with 2 additions and 1 deletions

View File

@ -278,10 +278,11 @@ namespace MoonWorks.Audio
if (!IsDisposed) if (!IsDisposed)
{ {
Running = false; Running = false;
Thread.Join();
if (disposing) if (disposing)
{ {
Thread.Join();
// stop all source voices // stop all source voices
foreach (var resource in resources) foreach (var resource in resources)
{ {