man god I hate "just don't do that then" answers on The Internet so much
"hey how do I properly terminate a process on python that is doing IO" "oh just switch to nonblocking IO"
well okay but have you considered that maybe this is not an option because I am calling code that may be doing IO that is not under my control