forked from Furumi/furumi-tui
Keep podcast store work in sync handlers off Tokio workers
The device-sync stream handlers exported and merged podcast snapshot sections and operations synchronously on a Tokio worker. While a large feed refresh held the store (up to about half a second), the worker's other tasks (feed checks, streams, art) waited. Run that work in block_in_place on the multi-thread runtime, and say so in ARCHITECTURE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e0da2ddf2b
commit
268ea915da
3 files changed
+68
-8
No files matched your search
+6
-3
@@ -333,9 +333,12 @@ The TUI owns what the contract leaves to clients:
|
||||
subscriptions are due; feeds are checked at most a few at a time, a success
|
||||
waits an hour, and failures back off exponentially (honouring
|
||||
`Retry-After`). Errors never clear the stored catalog.
|
||||
- **Runtime boundary.** Every store call, fetch and parse runs on the blocking
|
||||
pool or as a task and reports back through `AppEvent`s; `update::podcasts`
|
||||
holds the pure state transitions. Store open failures (newer schema,
|
||||
- **Runtime boundary.** Every store call, fetch and parse of the app runs on
|
||||
the blocking pool or as a task and reports back through `AppEvent`s;
|
||||
`update::podcasts` holds the pure state transitions. The device-sync
|
||||
stream handlers call the store (snapshot export and merges) inside
|
||||
`block_in_place`, so a store busy with a large feed refresh does not hold
|
||||
a Tokio worker's other tasks; they are never called on the UI thread. Store open failures (newer schema,
|
||||
foreign file) disable only the Podcasts tab and leave the file untouched.
|
||||
- **Sync log.** Local actions (subscribe, unsubscribe, mark played, progress)
|
||||
draw their operation stamps from the device-sync log through
|
||||
|
||||
Reference in new issue
Block a user