Are there any additional constraints on what can happen in a Python thread? Say I have some function foo.