For MySQL v8 and up, it is now possible to perform actual asynchronous operations. The official documentation covers how to do this in C:
C API Asynchronous Interface
https://dev.mysql.com/doc/c-api/8.0/en/c-api-asynchronous-interface.html
There are a collection of "async" MySQL Python libraries, but I'm not sure any are really completely non-blocking. They look to be "pseudo async", and especially when I don't see any indications that MySQL v8 or above is required to be paired with them.
I'm sure I can roll this C mechanism into Python via an extension, in a worse case scenario. I was just hoping maybe someone else already did the work for me!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…