Module

Examples.SharedStateDemo

Package
purescript-yoga-om-workerbees
Repository
rowtype-yoga/purescript-yoga-om-workerbees

#AppState Source

type AppState = { counter :: Int, isActive :: Boolean, message :: String }

#stateDemo Source

stateDemo :: Aff Unit

Console demo of SharedState (JSON-serialized shared state with spinlock)

This demonstrates:

  • Creating shared state with JSON serialization
  • Reading and writing shared state
  • Atomic modify operations
  • Spinlock-based synchronization