Monorepo for Tangled tangled.org

appview/pages: fix concurrent write in dev mode #326

merged
opened by ok-ciel.bsky.social targeting master from ok-ciel.bsky.social/core: push-zvxvmwyrrotr

Fixes a concurrent write panic that occurs when you switch pages quickly while in dev mode.

The fix uses a RWMutex to allow multiple template readers, but only one active writer. When not in dev mode, the only write to the templates map is when NewPages -> loadAllTemplates is called. When in dev mode the loadTemplateFromDisk is called and will load items into the templates map.

0
by ok-ciel.bsky.social 1 comment
expand 1 commit
appview/pages: fix concurrent write in dev mode

I have somehow never encountered this, thanks for the submission!

pull request successfully merged
sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:hrm6yw3li6jnjy4l5hcdexht/sh.tangled.repo.pull/3lufigjhfoe22