The threading
documentation explains it well:
When the timeout
argument is present and not None
, it should be a floating point number specifying a timeout for the operation in seconds (or fractions thereof). As join()
always returns None
, you must call is_alive()
after join()
to decide whether a timeout happened – if the thread is still alive, the join()
call timed out.
In essence, the timeout
argument tells join()
how long to wait for the thread to finish. If the length of time dictated by timeout
expires, the join()
call will end, but the thread will continue running. That is why you would need to call is_alive()
to check if the thread is still running.
Setting the timeout
argument to 0.0
would wait 0.0 seconds before timing out, thus, it would time out immediately. So to answer your question, no, there really would be no purpose for calling join()
and passing 0.0
, as there would be no wait.