https://superfastpython.com/thread-safe-print-in-python/
Python logging is thread safe if you want to use it for output