This afternoon’s lecture completed the review of Rust with an exploration of how references and ownership interact with threaded concurrency.
Impressively, the same mechanisms that ensure safe memory access also give data-race freedom; and applications of marker traits then extend that to guarantees about channel-based communication. All is not entirely straightforward, though: programming under Rust’s constraints can be awkward and difficult to accomplish. A whole range of additional constructions, from
RwLock<T>, have been built to provide necessary flexibility. These weaken the guarantees of safety and reintroduce runtime overheads — although the potential errors in aliasing or races that these introduce can now be handled at runtime rathe
Today’s metaphor for feature deconstruction was the Build-a-Bear Workshop chain and the incomparable Bling Frog.