-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add cancellation support to ReadWriteLock
#12120
Commits on Mar 1, 2022
-
Convert
ReadWriteLock
to use async context managersHas the side effect of fixing clean up for readers cancelled while waiting. Breaks the assumption that resolution of a writer `Deferred` means that previous readers and writers have completed, which will be fixed in the next commit. Signed-off-by: Sean Quah <seanq@element.io>
Sean Quah committedMar 1, 2022 Configuration menu - View commit details
-
Copy full SHA for 89fe787 - Browse repository at this point
Copy the full SHA 89fe787View commit details -
Fix clean up when waiting readers or writers are cancelled
Signed-off-by: Sean Quah <seanq@element.io>
Sean Quah committedMar 1, 2022 Configuration menu - View commit details
-
Copy full SHA for f1f363d - Browse repository at this point
Copy the full SHA f1f363dView commit details -
Don't cancel
Deferred
s that readers or writers are waiting onSean Quah committedMar 1, 2022 Configuration menu - View commit details
-
Copy full SHA for 9744823 - Browse repository at this point
Copy the full SHA 9744823View commit details -
Add
ReadWriteLock
cancellation testsSean Quah committedMar 1, 2022 Configuration menu - View commit details
-
Copy full SHA for 3241adc - Browse repository at this point
Copy the full SHA 3241adcView commit details -
Sean Quah committed
Mar 1, 2022 Configuration menu - View commit details
-
Copy full SHA for 68f5abe - Browse repository at this point
Copy the full SHA 68f5abeView commit details
Commits on Mar 4, 2022
-
Move lock setup into context manager to eliminate footgun
Sean Quah committedMar 4, 2022 Configuration menu - View commit details
-
Copy full SHA for 28dbe41 - Browse repository at this point
Copy the full SHA 28dbe41View commit details -
Use addBoth instead of addCallback, just in case
Sean Quah committedMar 4, 2022 Configuration menu - View commit details
-
Copy full SHA for c9f85e4 - Browse repository at this point
Copy the full SHA c9f85e4View commit details -
Refactor tests to deduplicate _start_reader_or_writer. And improve th…
…e docstrings.
Sean Quah committedMar 4, 2022 Configuration menu - View commit details
-
Copy full SHA for 716cded - Browse repository at this point
Copy the full SHA 716cdedView commit details -
Add comments/docstrings and rename variables to make test_rwlock more…
… understandable, hopefully
Sean Quah committedMar 4, 2022 Configuration menu - View commit details
-
Copy full SHA for c4a2a58 - Browse repository at this point
Copy the full SHA c4a2a58View commit details -
Configuration menu - View commit details
-
Copy full SHA for 31a2bb2 - Browse repository at this point
Copy the full SHA 31a2bb2View commit details
Commits on Mar 8, 2022
-
Add
delay_cancellation
utility function`delay_cancellation` behaves like `stop_cancellation`, except it delays `CancelledError`s until the original `Deferred` resolves. This is handy for unifying cleanup paths and ensuring that uncancelled coroutines don't use finished logcontexts. Signed-off-by: Sean Quah <seanq@element.io>
Sean Quah committedMar 8, 2022 Configuration menu - View commit details
-
Copy full SHA for 1c1b46a - Browse repository at this point
Copy the full SHA 1c1b46aView commit details -
Sean Quah committed
Mar 8, 2022 Configuration menu - View commit details
-
Copy full SHA for 65f97fa - Browse repository at this point
Copy the full SHA 65f97faView commit details -
Simplify release of write lock by delaying cancellation until the loc…
…k is acquired
Sean Quah committedMar 8, 2022 Configuration menu - View commit details
-
Copy full SHA for cadfe0a - Browse repository at this point
Copy the full SHA cadfe0aView commit details
Commits on Mar 14, 2022
-
Merge branch 'develop' into squah/readwritelock_cancellation_support
Sean Quah committedMar 14, 2022 Configuration menu - View commit details
-
Copy full SHA for 1cd035b - Browse repository at this point
Copy the full SHA 1cd035bView commit details -
Fixup merge, use latest version of
delay_cancellation
Sean Quah committedMar 14, 2022 Configuration menu - View commit details
-
Copy full SHA for 4c47827 - Browse repository at this point
Copy the full SHA 4c47827View commit details -
Update synapse/util/async_helpers.py
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 1b9ec9b - Browse repository at this point
Copy the full SHA 1b9ec9bView commit details