Skip to content

Exit after Run #6

@ltieman

Description

@ltieman

Hello,

I'm just learning async, so this might just be dumb, and it seems my piece here is working fine, other than it is returning Process finished with exit code 0 after I run the class.

`class foo:

def __init__(self):
    self.session=AsyncSession(n=100)
    self.main_out=self.session.run(self.main)
    print("still alive")

async def main(self):
    rs = []
    for _ in range(100):
        rs.append(await self.sub('bar'))
    return[ (x[0].json(),x[1]) for x in rs]

async def sub(self,key):
    return  await self.session.get('http://httpbin.org/get'),key`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions