Denis @nuculabs.dev · Dec 10

I've used a thread to make my Chip8 emulator more responsive when handling input. I'm not sure if I did it right tho, as I'm new to Rust. The input handling logic waits for a key to be pressed and updates a struct field with it. #rustlang

1 likes 1 replies

?

Replies

Denis · Dec 10

To do this I used a channel because I got ownership errors when I tried to move self into the thread which I could not solve. I'll try this later: wrap my struct field in an Arc Mutex and pass it to the thread to see if that works