# Threading in Python

Henceforth all posts regarding a certain programming language shall be denoted in the title using comments specific to that language. This is for visual purposes, as well as for fun.

Threading in Python

Setting up separate threads is incredibly easy in Python. There are several tutorials out there suggesting one subclass the threading.Thread class and override the run method, but this is not necessary. Simply do the following:

import threading

def func():
    # ... some code here
    pass

new_thread = threading.Thread(target=func)
new_thread.start()

This will run func in a new thread. Interacting threads is a bit trickier, but I refuse to write anything about that until I know something about it.