Skip to content

Commit 34215a9

Browse files
committed
Correct the stop-watching wire claim and the copied-filename import note
1 parent b9284a5 commit 34215a9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/handlers/subscriptions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Two more properties of the handle:
8383

8484
Open the subscription first, then start the watcher and get on with your work.
8585

86-
`app.py` imports `BOARD` and `read_board` from `client.py` above. If you save the files side by side rather than as a package, drop the leading dot from that import.
86+
`app.py` imports `BOARD` and `read_board` from the previous example, which this repo stores as `tutorial003.py`. If you save the rendered files side by side as `client.py` and `app.py`, write `from client import BOARD, read_board` instead.
8787

8888
=== "asyncio"
8989

@@ -107,7 +107,7 @@ The order is the point. Nothing is replayed, so an event published before your s
107107

108108
Requests run freely beside an open stream, from the watcher task or any other, on the same client. Because *duplicate* unconsumed events coalesce, a busy main flow may produce one refetch rather than three. Events that differ do not coalesce: a filter naming many URIs queues one pending event per URI.
109109

110-
To stop watching, leave the block: there is no `unsubscribe` call. Cancelling the task that owns the block does that for you, and the SDK sends `notifications/cancelled` for the listen request. A watcher that runs for the life of your app never returns on its own, so cancel it, or its task group's scope, at shutdown.
110+
To stop watching, leave the block: there is no `unsubscribe` call. Cancelling the task that owns the block does that for you, and the SDK cancels the listen request the way the transport expects: over streamable HTTP, by closing that request's stream. A watcher that runs for the life of your app never returns on its own, so cancel it, or its task group's scope, at shutdown.
111111

112112
## Streams end
113113

0 commit comments

Comments
 (0)