Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow dominate to work in async contexts #187

Merged
merged 2 commits into from
Dec 24, 2023
Merged

Allow dominate to work in async contexts #187

merged 2 commits into from
Dec 24, 2023

Commits on Dec 13, 2023

  1. Allow dominate to work in async contexts

    Using ContextVars to allow dominate to work within async contexts. Added
    unit tests to ensure code works as expected.
    tlonny committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    be2f92b View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2023

  1. Small Fixes

     - Added .venv and .envrc to .gitignore (I use direnv and venv to keep
       my python environments isolated - I hope this is okay!)
     - Removed print statements I left in dom_tag during debugging
     - Replaced global incrementing int with UUID for contextvar ID
       generation - this zeroes the risk of race-hazards/collisions
     - _get_thread_context now returns a tuple vs. a hash of a tuple.
       Functionally not much changes - the underlying dictionary will still
       use the same hashing function but the only difference is that _if_
       there is a collision, the dictionary will still be able to return the
       correct element
    tlonny committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    5746232 View commit details
    Browse the repository at this point in the history