Skip to content

Commit

Permalink
Fixed ApartmentState property obsolete warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hagronnestad committed Sep 26, 2019
1 parent 7e46f43 commit 98d441c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ComputerSystems/Commodore64/C64.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ public void Run() {

var cpuClockSpeedPal = 1.0f / CLOCK_PAL;
var swCpuClock = Stopwatch.StartNew();


new Thread(() => {

var t = new Thread(() => {
while (_isRunnning) {

// CPU clock
Expand All @@ -71,8 +70,10 @@ public void Run() {

_tcsStop.SetResult(true);

}) { ApartmentState = ApartmentState.STA }.Start();
});

t.SetApartmentState(ApartmentState.STA);
t.Start();
}

public Task<bool> Stop() {
Expand Down

0 comments on commit 98d441c

Please sign in to comment.