File tree 3 files changed +14
-4
lines changed
3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,10 @@ or create a
23
23
[ pull request] ( https://github.com/rmorshea/idom/pulls ) . Thanks in advance!
24
24
25
25
<h3 >
26
- <a href =" https://mybinder.org/v2/gh/rmorshea/idom/master?filepath=notebooks%2Fintroduction.ipynb " >
26
+ <a
27
+ target="_ blank"
28
+ href="https://mybinder.org/v2/gh/idom-team/idom-jupyter/master?filepath=notebooks%2Fintroduction.ipynb "
29
+ >
27
30
Try it Now
28
31
<img alt="Binder" valign="bottom" height="25px"
29
32
src="https://mybinder.org/badge_logo.svg"
Original file line number Diff line number Diff line change @@ -99,6 +99,13 @@ def __init__(self, layout: Layout) -> None:
99
99
self ._model_state : Any = {}
100
100
self ._update_queues : Dict [str , asyncio .Queue [LayoutUpdate ]] = {}
101
101
102
+ async def start (self ) -> None :
103
+ await self .__aenter__ ()
104
+
105
+ async def stop (self ):
106
+ self .task_group .cancel_scope .cancel ()
107
+ await self .__aexit__ (None , None , None )
108
+
102
109
@async_resource
103
110
async def task_group (self ) -> AsyncIterator [TaskGroup ]:
104
111
async with create_task_group () as group :
Original file line number Diff line number Diff line change @@ -167,13 +167,13 @@ async def _activate_dispatcher(
167
167
self , app : Sanic , loop : asyncio .AbstractEventLoop
168
168
) -> None :
169
169
self ._dispatcher = cast (SharedViewDispatcher , self ._make_dispatcher ({}, loop ))
170
- await self ._dispatcher .__aenter__ ()
170
+ await self ._dispatcher .start ()
171
171
172
172
async def _deactivate_dispatcher (
173
173
self , app : Sanic , loop : asyncio .AbstractEventLoop
174
174
) -> None : # pragma: no cover
175
- # this doesn't seem to get triffered during testing for some reason
176
- await self ._dispatcher .__aexit__ ( None , None , None )
175
+ # this doesn't seem to get triggered during testing for some reason
176
+ await self ._dispatcher .stop ( )
177
177
178
178
async def _run_dispatcher (
179
179
self ,
You can’t perform that action at this time.
0 commit comments