Skip to content

jespharr/learning-rust-game_of_life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My girlfriend told me to implement Game of Life as a first rust project, so here we are.

I had only read chapters 1-6 of The Book and finished 40/94 rustlings when I started, and in hindsight I should have probably started with something that didn't require multi-threading and saved this for my second project after finishing chapter 12 or so.

When I first started implementing the second thread to handle inputs I was wrapping the grid in a mutex+Arc to share it between the threads. I really hated that design because it forced the threads to constantly sync and the code just seemed so unnecessarily complex. I was happy to find out about channels which allowed for this much simpler and more efficient design where the threads can subscribe to changes asynchronously instead.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages