kotlin native concurrency explained kevin galligan
play

KOTLIN NATIVE CONCURRENCY EXPLAINED KEVIN GALLIGAN @kpgalligan - PowerPoint PPT Presentation

KOTLIN NATIVE CONCURRENCY EXPLAINED KEVIN GALLIGAN @kpgalligan Copenhagen Denmark Touchlab [Your Org Here] reach out if interested, obv kevin@touchlab.co @kpgalligan I still have a talk! and then multithreaded


  1. Functions Have State careful what you capture

  2. Global State some special rules

  3. val mainOnly = SomeData("a", 1)

  4. val mainOnly = SomeData("a", 1) object GlobalObject { val data = SomeData("b", 2) }

  5. @ThreadLocal val mainOnly = SomeData("a", 1) @ThreadLocal object GlobalObject { val data = SomeData("b", 2) }

  6. @SharedImmutable val mainOnly = SomeData("a", 1) @ThreadLocal object GlobalObject { val data = SomeData("b", 2) }

Recommend


More recommend