diff options
author | Sean Quah <8349537+squahtx@users.noreply.github.com> | 2022-04-05 15:43:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-05 15:43:52 +0100 |
commit | 800ba87cc881856adae19ec40485578356398639 (patch) | |
tree | cb19370283b7def590239b507c5dc5c72e39af8a /synapse/handlers/room.py | |
parent | Merge branch 'master' into develop (diff) | |
download | synapse-800ba87cc881856adae19ec40485578356398639.tar.xz |
Refactor and convert `Linearizer` to async (#12357)
Refactor and convert `Linearizer` to async. This makes a `Linearizer` cancellation bug easier to fix. Also refactor to use an async context manager, which 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>
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r-- | synapse/handlers/room.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 51a08fd2c0..65d4aea9af 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -883,7 +883,7 @@ class RoomCreationHandler: # # we also don't need to check the requester's shadow-ban here, as we # have already done so above (and potentially emptied invite_list). - with (await self.room_member_handler.member_linearizer.queue((room_id,))): + async with self.room_member_handler.member_linearizer.queue((room_id,)): content = {} is_direct = config.get("is_direct", None) if is_direct: |