How to poll with aiogram without the executor?

Solution 1:

The solution was to use the dispatcher directly rather than the executor utility as shown below:

async def task1():
    await dp.start_polling()

async def task2():
    while True:
        # Perform other application's component
        await asyncio.sleep(1)

async def main():
    await asyncio.gather(
        task1(),
        task2(),    
    )

if __name__ == '__main__':
    asyncio.get_event_loop().run_until_complete(main())