Rust Talk: The Concurrent State of Rust

Yesterday, I gave a talk at the Seattle Rust meetup.

Here is a link to the slides:

To start off, I might not be very qualified to give a talk about Rust. However, I was going to research concurrency and the various ways of accomplishing that with Rust. I figured I might as well share that research with my fellow Seattleites.

By no means was I able to cover everything, but I think I was able to successfully demo a good variety of code based off the standard library as well as some code based off of interesting third-party libraries. (futures, coroutines, async/await)

I gave the talk and didn’t have any benchmarks, though. I decided that was no good so I added benchmarks. I had to change the code from using seconds to using milliseconds for the sake of time, but I think it provides some useful stats:

If you look closely you will see a couple issues.

The first issue is that my mioco coroutines implementation is dreadfully slow. I’m really not sure why, but I am almost certain that it is something I did wrong.

The second issue is that my promises implementation runs in similar time to the non-async version. This is caused by the fact that event loop for promises is single threaded. This means that the sleep method also puts the event loop to sleep which is not ideal. However, You can basically subtract the time of the raw operation from the promises implementation time to get a useful delta of how much overhead is added by the promises lib.

All in all, I was happy to present to the group. It was humbling and I definitely felt foolish trying to teach anything to people much more knowledgeable than me, but hopefully they were able to gain some useful links and ideas from the process.