Amjad50 / plastic

NES emulator in rust with egui and TUI
MIT License
299 stars 12 forks source link

Thread Safety Concerns with gilrs and audio_player #17

Closed silverhadch closed 17 hours ago

silverhadch commented 1 day ago

There is no mention of locking or managing concurrent access to shared resources like the gilrs gamepad instance and audio_player. If accessed from multiple threads, this could cause undefined behavior.

Ensure thread safety using appropriate synchronization mechanisms (e.g., Mutex or RwLock).

Amjad50 commented 1 day ago

But there is no thread safety concerns because there is no threads here.

I don't see a point of concurrency if there is nothing running concurrently.

This tui binary is just a binary, i.e. others can't use it as a dependancy and introduce threading issues.

silverhadch commented 17 hours ago

Yeah forgot