Swift Talk #42 Thread Safety (Reactive Programming #5) 23:36

We make our Signal implementation thread-safe by safeguarding the access to shared resources.


March 28, 2017

When we prepared the episode, our Atomic class had a mutate method on it and no setter for value. In a last-minute decision before recording, we decided to go with a setter instead. As Adam Sharp and Tobias Haeberle pointed out, the code contains a subtle thread safety bug. ReactiveSwift contains the same bug, and Adam opened an issue.

See the commit on our Github repository for how to fix this.