In python we have the GIL, which limits the interpreter to only allow one thread at a time to execute python-code. Since all your function-code is python, it just works "normally" since all threads are waiting to get some "run time" i.e they can only execute code one at a time.