What’s covered 1. What does “thread-safety” mean? 2. Should you care about it at all? 3. Thread-safety problems & solutions a. When is there a potential thread-safety issue? b. Atomic access to shared state c. Delegating thread-safety d. Atomic compound actions e. Visibility & stale data 4. Where to go from here?
Action point: 1) Create an example app with the two versions of the class 2) Start a dozen threads, invoking the methods concurrently 3) What’s the value after the threads finish?
Action point: 1) Create an example app with the two versions of the class 2) Start a dozen threads, invoking the methods concurrently 3) Prove that one of the classes is thread-safe, the other is not
Action point: 1) Create an example app with the two versions of the class 2) Start a dozen threads, invoking the methods concurrently 3) What’s the value after the threads finish?
Action point: 1) Create an example app with the previous example 2) Start a dozen threads, invoking the methods concurrently 3) Verify that the application hangs forever due to visibility issues
Action point: 1) Buy the book 2) Read every chapter at least twice. Focus on the first five ones 3) Take book notes along the way a) OR use mine - github.com/preslavmihaylov/booknotes 4) Finish the action points in this slide deck & continue doing that for all examples in the book