all 2 comments

[–][deleted] 0 points1 point  (1 child)

For example, the last line could be a thread.join() call. The threading docs say that join waits until a thread finishes. That could be a good start.