---
title: "Advance Round"
method: POST
path: "/chatrooms/{room_name}/canasta/advance"
tags: ["canasta"]
---

# Advance Round

`POST /chatrooms/{room_name}/canasta/advance`

Advance to the next round type after scoring. Any participant can call this.

Deliberately a plain `def`, like every other mutating handler here: it takes a
`FOR UPDATE` row lock through a SYNCHRONOUS session and contains no awaits.
As `async def` it ran on the event loop, so when three clients hit the end of
a scoring countdown together — which is exactly what they do, the countdown
is the same for everyone — one request held the lock while the loop was
blocked by the next request waiting for it, and the whole backend stopped
answering anybody. FastAPI runs a sync handler in a threadpool, where waiting
for a lock costs one thread instead of the entire server.

## Path parameters

- `room_name` string, required

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/fluentea/apis/aurqa-language-learning-platform-refactored.md) · [All operations](https://skmtc.dev/fluentea/apis/aurqa-language-learning-platform-refactored/llms.txt) · [OpenAPI document](https://skmtc.dev/fluentea/apis/aurqa-language-learning-platform-refactored/revisions/13996d792e23?raw)
