Skip to content

JWorthe/rust_channels_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Multithreaded Rust Demo

An example of a fake game, with an expensive calculation that can be pushed off to another thread.

There will be a blog post to explain this better, coming soon on https://www.worthe-it.co.za.

Running

This demo shows two cases, one that uses threading for an ‘expensive’ calculation and one that does now.

The version without threading can be run with

cargo run --bin no-thread

The version that does uses threads, and communicates its results back to the parent thread with a channel, can be run with

cargo run --bin channels

Acknowledgements

This example is based on a Piston game engine tutorial written by TyOverby <ty@pre-alpha.com> and Nikita Pekin <contact@nikitapek.in> (https://github.com/PistonDevelopers/Piston-Tutorials/tree/master/getting-started)

About

An example of a fake game, with an expensive calculation that can be pushed off to another thread

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages