Skip to content

Simple Pulling Game: Test of std::sync::Mutex and std::sync::Arc

Notifications You must be signed in to change notification settings

bingli224/rust_test_thrd_mutex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Pulling Game

Test Mutex+Arc

Each threads are the players that can change the racing position with predefined role to be either -1 or 1. The player sleeps after each action. The game stops when the game position reaches the positive-or-negative target, and all other players will stop.

Image of demo 1 Image of demo 1

About

Simple Pulling Game: Test of std::sync::Mutex and std::sync::Arc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages