Oddbean new post about | logout

Notes by d4858bd6 | export

 Observation framework runs the onChange only once, which means you should call it recursively to observe changes constantly, and onChange closure runs before the actual change applies. That’s why we postpone the onChange action by starting a new task. 
https://swiftwithmajid.com/2023/10/03/mastering-observable-framework-in-swift/

https://files.mastodon.social/media_attachments/files/111/187/467/603/254/927/original/6a1d59c0354512ff.png 
 We can use DispatchQueue.concurrentPerform function to verify the thread safety of our types using unit tests. Don't wait for strange crashes from production, invest your time earlier into safe types.
https://swiftwithmajid.com/2023/09/05/thread-safety-in-swift-with-locks/

https://files.mastodon.social/media_attachments/files/111/028/577/816/524/980/original/205f237b69e1429f.png