Remove use of `tractor.run()`
parent
d7f80d8ddb
commit
5d30f351af
|
@ -159,20 +159,20 @@ def run_qtractor(
|
||||||
'main': instance,
|
'main': instance,
|
||||||
}
|
}
|
||||||
|
|
||||||
# setup tractor entry point args
|
# define tractor entrypoint
|
||||||
main = partial(
|
async def main():
|
||||||
tractor._main,
|
|
||||||
async_fn=func,
|
|
||||||
args=args + (widgets,),
|
|
||||||
arbiter_addr=(
|
|
||||||
tractor._default_arbiter_host,
|
|
||||||
tractor._default_arbiter_port,
|
|
||||||
),
|
|
||||||
name='qtractor',
|
|
||||||
**tractor_kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
# guest mode
|
async with tractor.open_root_actor(
|
||||||
|
arbiter_addr=(
|
||||||
|
tractor._root._default_arbiter_host,
|
||||||
|
tractor._root._default_arbiter_port,
|
||||||
|
),
|
||||||
|
name='qtractor',
|
||||||
|
**tractor_kwargs,
|
||||||
|
) as a:
|
||||||
|
await func(*(args + (widgets,)))
|
||||||
|
|
||||||
|
# guest mode entry
|
||||||
trio.lowlevel.start_guest_run(
|
trio.lowlevel.start_guest_run(
|
||||||
main,
|
main,
|
||||||
run_sync_soon_threadsafe=run_sync_soon_threadsafe,
|
run_sync_soon_threadsafe=run_sync_soon_threadsafe,
|
||||||
|
|
|
@ -112,8 +112,6 @@ CHART_MARGINS = (0, 0, 2, 2)
|
||||||
_min_points_to_show = 6
|
_min_points_to_show = 6
|
||||||
_bars_from_right_in_follow_mode = int(6**2)
|
_bars_from_right_in_follow_mode = int(6**2)
|
||||||
_bars_to_left_in_follow_mode = int(6**3)
|
_bars_to_left_in_follow_mode = int(6**3)
|
||||||
|
|
||||||
|
|
||||||
_tina_mode = False
|
_tina_mode = False
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue