We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70d97bc commit 6c0b374Copy full SHA for 6c0b374
shiny/_app.py
@@ -310,7 +310,9 @@ def _request_flush(self, session: Session) -> None:
310
async def _flush_pending_sessions(self) -> None:
311
# TODO: Until we have reactive domains, flush all sessions (because we
312
# can't yet keep track of which ones need a flush)
313
- for _, session in self._sessions.items():
+ # Use list() to create a copy, in case self._sessions mutates from under us,
314
+ # which would cause a "dictionary changed size during iteration" RuntimeError
315
+ for _, session in list(self._sessions.items()):
316
await session._flush()
317
# for id, session in self._sessions_needing_flush.items():
318
# await session.flush()
0 commit comments