Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Refactor Linearizer, convert methods to async and use an async context manager #12357

Merged
merged 18 commits into from
Apr 5, 2022

Commits on Apr 1, 2022

  1. Add docstrings to Linearizer test cases

    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    e0c1444 View commit details
    Browse the repository at this point in the history
  2. Add comments to Linearizer tests

    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    071618d View commit details
    Browse the repository at this point in the history
  3. Add helper methods to create a linearized task and pump the reactor

    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    45ce571 View commit details
    Browse the repository at this point in the history
  4. Convert Linearizer tests from inlineCallbacks to async

    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    7842add View commit details
    Browse the repository at this point in the history
  5. Add missing type hints to Linearizer tests

    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    4cca457 View commit details
    Browse the repository at this point in the history
  6. Add newsfile

    Sean Quah committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    5bfb04d View commit details
    Browse the repository at this point in the history
  7. fixup typo in test_lots_of_queued_things docstring

    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    ba5839c View commit details
    Browse the repository at this point in the history
  8. fixup: add helpful message to assert

    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    632bd38 View commit details
    Browse the repository at this point in the history
  9. Convert Linearizer methods to async

    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    ac80234 View commit details
    Browse the repository at this point in the history
  10. Refactor Linearizer._await_lock, moving preconditions inside

    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    f96583d View commit details
    Browse the repository at this point in the history
  11. Factor out a Linearizer._release_lock() method.

    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    adf5d14 View commit details
    Browse the repository at this point in the history
  12. Convert Linearizer to use an async context manager

    Eliminates an unlikely footgun where code that doesn't immediately use
    the context manager could forget to release the lock.
    
    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    744cbbe View commit details
    Browse the repository at this point in the history
  13. Convert Linearizer to use an async context manager

    Signed-off-by: Sean Quah <seanq@element.io>
    Sean Quah committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    3fcd05b View commit details
    Browse the repository at this point in the history
  14. Add newsfile

    Sean Quah committed Apr 1, 2022
    Configuration menu
    Copy the full SHA
    31fda92 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2022

  1. Early return and outdent the slow path

    Sean Quah committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    9de8d18 View commit details
    Browse the repository at this point in the history
  2. Update out-of-date comment

    Sean Quah committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    039872e View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2022

  1. Update synapse/util/async_helpers.py

    Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
    squahtx and richvdh committed Apr 5, 2022
    Configuration menu
    Copy the full SHA
    bb7a8e3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e41a7ee View commit details
    Browse the repository at this point in the history