When a thread reaches the end of it's code block, or is issued a return, it sits and waits with it's return values, for the main thread to join it back in. When you detach the thread, the main thread no longer keeps count of it, and dosn't wait around for any return values. When a detached thread ends, it just goes away, instead of sitting there waiting to be joined.
If you are using the old 5.8.8 version of threads, you will have to do a bit more work, because, as you say, many thread methods are missing in 5.8.8. You will have to rely on older hacks and work-arounds, for instance see Re: Backticks and SIGALRM
In reply to Re^3: how can I detach a thread from another or how can I set a timer for a thread?
by zentara
in thread how can I detach a thread from another or how can I set a timer for a thread?
by boeingdream
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |