Skip to content

hockeybuggy/dining_philosophers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dining philosophers

This is effectively a exact copy of the code in the excellent rust book's "Dining Philosophers" example with two changes.

  1. std::time::sleep_ms has been deprecated since the version of the book with this example was released. Instead this uses std::time::Duration::from_millis.

  2. Added an extra sleep between grabbing forks. Without it I couldn't replicate a deadlock.

About

A rust toy demonstrating threading and deadlocks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages