Hotfix: open a tractor context to fsps...

The prior PR for fixing fsp array misalignment also added
`tractor.Context` usage which wasn't reflected in the graphics update
loop (newer code added it but the prior PR was factored from path
dependent history) and thus was broken. Further in newer work we don't
have fsp actors actually stream value updates since the display loop can
already pull from the source feed and update graphics at a preferred
throttle rate.  Re-enabled the fsp stream sending here by default until
that newer only-throttle-pull-from-source code is landed in the display
loop.
fsp_hotfixes
Tyler Goodlet 2021-11-05 09:33:48 -04:00
parent 186d221dda
commit ea9b66d1c3
2 changed files with 5 additions and 9 deletions

View File

@ -90,7 +90,7 @@ async def fsp_compute(
func_name: str, func_name: str,
func: Callable, func: Callable,
attach_stream: bool = False, attach_stream: bool = True,
task_status: TaskStatus[None] = trio.TASK_STATUS_IGNORED, task_status: TaskStatus[None] = trio.TASK_STATUS_IGNORED,
) -> None: ) -> None:

View File

@ -427,7 +427,7 @@ async def run_fsp(
) )
async with ( async with (
portal.open_stream_from( portal.open_context(
# chaining entrypoint # chaining entrypoint
fsp.cascade, fsp.cascade,
@ -437,21 +437,17 @@ async def run_fsp(
src_shm_token=src_shm.token, src_shm_token=src_shm.token,
dst_shm_token=conf['shm'].token, dst_shm_token=conf['shm'].token,
symbol=sym, symbol=sym,
fsp_func_name=fsp_func_name, func_name=fsp_func_name,
loglevel=loglevel, loglevel=loglevel,
) as stream, ) as (ctx, last_index),
ctx.open_stream() as stream,
open_sidepane( open_sidepane(
linkedsplits, linkedsplits,
display_name, display_name,
) as sidepane, ) as sidepane,
): ):
# receive last index for processed historical
# data-array as first msg
_ = await stream.receive()
shm = conf['shm'] shm = conf['shm']
if conf.get('overlay'): if conf.get('overlay'):