File tree Expand file tree Collapse file tree 1 file changed +3
-21
lines changed
Expand file tree Collapse file tree 1 file changed +3
-21
lines changed Original file line number Diff line number Diff line change 2525"""
2626
2727
28- class Stop (BaseException ):
29- """Deprecated
30-
31- Stop serving changes and events
32-
33- Raising this error will tell dispatchers to gracefully exit. Typically this is
34- called by code running inside a layout to tell it to stop rendering.
35- """
36-
37-
3828async def serve_layout (
3929 layout : LayoutType [
4030 LayoutUpdateMessage | dict [str , Any ], LayoutEventMessage | dict [str , Any ]
@@ -44,17 +34,9 @@ async def serve_layout(
4434) -> None :
4535 """Run a dispatch loop for a single view instance"""
4636 async with layout :
47- try :
48- async with create_task_group () as task_group :
49- task_group .start_soon (_single_outgoing_loop , layout , send )
50- task_group .start_soon (_single_incoming_loop , task_group , layout , recv )
51- except Stop : # nocov
52- warn (
53- "The Stop exception is deprecated and will be removed in a future version" ,
54- UserWarning ,
55- stacklevel = 1 ,
56- )
57- logger .info (f"Stopped serving { layout } " )
37+ async with create_task_group () as task_group :
38+ task_group .start_soon (_single_outgoing_loop , layout , send )
39+ task_group .start_soon (_single_incoming_loop , task_group , layout , recv )
5840
5941
6042async def _single_outgoing_loop (
You can’t perform that action at this time.
0 commit comments