Edit: I did some further prototyping that suggests this wont work with requests, but I do not really know. Be careful about prototyping! No matter how much you test, it still might not work in an actual game. Sorry.
Tcp requires a round trip for acknowledgments so it can be considerably slower relatively. I did not mean to be comparing tcp and udp tho. I was referring to some thing that is very particularly and possibly exclusively a Bge issue. If you run two scrips in the same tic, then the second script will not run until the first script closes. When a python module is told to not block, it will allow the script to continue, but will not allow the script to close. This means that even tho the script is not blocked, game logic will still be blocked.
This is the closest thing I have been able to find that seems to work. Its based on this tutorial. Notice the last line event_loop.run_until_complete(sleep(0)) is different then in the tutorial. I have not yet tried it in an actual game.
if 'frameTime' in bge.logic.globalDict:
bge.logic.globalDict['frameTime'] += 1
bge.logic.globalDict['frameTime'] = 0
from asyncio import get_event_loop, sleep
from random import randint
event_loop = get_event_loop()
async def longTask(taskId, secs):
print(str(taskId)+': sleep for '+str(secs)+' secondes.')
message = await sleep(secs)
print(str(taskId)+': slept for '+str(secs)+' secondes.')
event_loop.create_task( longTask(bge.logic.globalDict['frameTime'], randint(1,10)) )
Networking in the Bge has been a continuing problem. I would likely read your code even if it is incomplete or dose not work. Consider making a page for it on the Comunity Wiki. That way it wont get buried under other posts.