Trying to understand how asyncio works. The task: have to add some code to lower pseudocode so that requests must be consecutive (0, 1, 2... 9), I need to exclude data race. I tried to add loop (asyncio.get_event_loop() and run_until_complete()), but got only 'RuntimeError: This event loop is already running'. In what direction should I move in order to understand how it works? Thank you!
requests = [server.some_method(value) for value in range(10)]
await asyncio.gather(*requests)