Drop unecessary partial

clusters_and_hot_tips
Tyler Goodlet 2021-11-04 10:41:25 -04:00
parent 94a6fefede
commit 546e1b2fa3
2 changed files with 2 additions and 15 deletions

View File

@ -321,8 +321,6 @@ spawn a flat cluster:
.. code:: python
from functools import partial
import trio
import tractor
@ -353,12 +351,7 @@ spawn a flat cluster:
):
for (name, portal) in portal_map.items():
n.start_soon(
partial(
portal.run,
sleepy_jane,
)
)
n.start_soon(portal.run, sleepy_jane)
await trio.sleep(0.5)

View File

@ -1,4 +1,3 @@
from functools import partial
import trio
import tractor
@ -30,12 +29,7 @@ async def main():
):
for (name, portal) in portal_map.items():
n.start_soon(
partial(
portal.run,
sleepy_jane,
)
)
n.start_soon(portal.run, sleepy_jane)
await trio.sleep(0.5)