Say I have some function foo
.
Consider snippet A:
args = # some args
foo(*args)
And consider snippet B:
import threading
args = # some args
thread = threading.Thread(foo(*args))
thread.start()
thread.join() # yes, I do mean to immediately join after starting
I want to know what sorts of things (if anything) I could do in foo
such that A and B behave differently (eg crash or different run time).
The thought experiment serves to hopefully answer my main question.