Use `.wait_for_result()` in dated examples
Swap the deprecated `portal.result()` calls for the modern `.wait_for_result()` spelling in, - `a_trynamic_first_scene.py` (x2) - `actor_spawning_and_causality.py` - `parallelism/single_func.py` These 3 are literalinclude'd by the new docs tree so the rendered code must teach the current api; the `debugging/` set still calls `.result()` (pexpect pattern-matched tests, left for a follow-up sweep). (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-codedocs_vibed_for_serious
parent
2e2d988bf7
commit
fb8a6b2473
|
|
@ -35,8 +35,8 @@ async def main():
|
|||
name='gretchen',
|
||||
other_actor='donny',
|
||||
)
|
||||
print(await gretchen.result())
|
||||
print(await donny.result())
|
||||
print(await gretchen.wait_for_result())
|
||||
print(await donny.wait_for_result())
|
||||
print("CUTTTT CUUTT CUT!!! Donny!! You're supposed to say...")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ async def main():
|
|||
# The ``async with`` will unblock here since the 'some_linguist'
|
||||
# actor has completed its main task ``cellar_door``.
|
||||
|
||||
print(await portal.result())
|
||||
print(await portal.wait_for_result())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ async def main():
|
|||
await burn_cpu()
|
||||
|
||||
# wait on result from target function
|
||||
pid = await portal.result()
|
||||
pid = await portal.wait_for_result()
|
||||
|
||||
# end of nursery block
|
||||
print(f"Collected subproc {pid}")
|
||||
|
|
|
|||
Loading…
Reference in New Issue