Skip to content

Adds option to remove thread check on sqlite persister for streamlit#286

Merged
elijahbenizzy merged 2 commits into
mainfrom
fix-counter-example
Jul 29, 2024
Merged

Adds option to remove thread check on sqlite persister for streamlit#286
elijahbenizzy merged 2 commits into
mainfrom
fix-counter-example

Conversation

@elijahbenizzy

@elijahbenizzy elijahbenizzy commented Jul 28, 2024

Copy link
Copy Markdown
Contributor

Streamlit uses multiple threads for execution, which can mess with the sqlite persister, which wants to be all on the same thread. This allows it to bypass the thread check with an option.

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

@elijahbenizzy elijahbenizzy requested a review from skrawcz July 28, 2024 19:04
@elijahbenizzy elijahbenizzy force-pushed the fix-counter-example branch 2 times, most recently from b517727 to 31a9c93 Compare July 28, 2024 19:10

@skrawcz skrawcz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just go ahead and expose passing in connect kwargs. That will simplify things. E.g. for disabling the check for the same thread see kwargs you can pass to connect...

Comment thread burr/core/persistence.py Outdated
Comment thread burr/core/persistence.py Outdated
Streamlit uses multiple threads for execution, which can mess with the
sqlite persister, which wants to be all on the same thread. This allows
it to bypass the thread check with an option.
@elijahbenizzy elijahbenizzy merged commit 4b332b7 into main Jul 29, 2024
@elijahbenizzy elijahbenizzy deleted the fix-counter-example branch July 29, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants