Stopgap: don't rerun Context.started() fsp calc task

win_fixes
Tyler Goodlet 2021-11-05 15:45:56 -04:00
parent 49885ca750
commit 5f45404efb
1 changed files with 4 additions and 1 deletions

View File

@ -145,10 +145,13 @@ async def fsp_compute(
profiler(f'{func_name} pushed history')
profiler.finish()
# TODO: UGH, what is the right way to do something like this?
if not ctx._started_called:
await ctx.started(index)
# setup a respawn handle
with trio.CancelScope() as cs:
tracker = TaskTracker(trio.Event(), cs)
await ctx.started(index)
task_status.started((tracker, index))
profiler(f'{func_name} yield last index')