You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realize that Tornado doesn't support cancelling. I thought I'd document this issue anyway, since it caused a server hang in our app, and was tricky to debug.
If the task waiting on a queue gets cancelled, the result of the future is lost. put_nowait pulls off the queue item and get does not catch CancelledError. When the task is cancelled, the queue item is lost.
Adding a note from #3770: That PR fixed cancellation issues for code that uses async with. Fixing a bare await lock.acquire() is trickier and hasn't been done yet; it should be done as a part of the queue work since await queue.get() has the same issue.
Activity
bdarnell commentedon Nov 19, 2026
Adding a note from #3770: That PR fixed cancellation issues for code that uses
async with. Fixing a bareawait lock.acquire()is trickier and hasn't been done yet; it should be done as a part of the queue work sinceawait queue.get()has the same issue.