How to use the aiomisc.get_context function in aiomisc

To help you get started, we’ve selected a few aiomisc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aiokitchen / aiomisc / tests / test_entrypoint.py View on Github external
async def test():
        context = aiomisc.get_context()

        context['foo'] = True
        await asyncio.sleep(0.1)
        results.append(await context['foo'])

        context['foo'] = False
        await asyncio.sleep(0.1)
        results.append(await context['foo'])

        context['foo'] = None
        await asyncio.sleep(0.1)
        results.append(await context['foo'])
github aiokitchen / aiomisc / tests / test_entrypoint.py View on Github external
async def start(self):
            context = aiomisc.get_context()

            await asyncio.sleep(0.1)

            await context['test']
            Awaiter.result = await context['test']
github aiokitchen / aiomisc / tests / test_entrypoint.py View on Github external
async def start(self):
            context = aiomisc.get_context()
            await asyncio.sleep(0.1)
            context['test'] = True