I've tried a lot of searching but didn't really know how to word my problem, so it may be that there's a solution that I couldn't find because I didn't know how to search for it.
I have a single line of code that I'd like to run in a separate thread. So far I have the impression that to create a new thread you have to put the code you want to run inside its own function and then call that function using the
threading.Thread(target = functionName).start()
// any amount of code goes here and it will be run in its own thread
Using python you can make inline functions using
threading.Thread(target = lambda: print('hi')).start()
In this case, note that 'hi' won't show in the terminal as it's in another thread