in reply to Re^2: how can I detach a thread from another or how can I set a timer for a thread?
in thread how can I detach a thread from another or how can I set a timer for a thread?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: how can I detach a thread from another or how can I set a timer for a thread?
by locked_user sundialsvc4 (Abbot) on Nov 14, 2011 at 14:44 UTC | |
|
Re^4: how can I detach a thread from another or how can I set a timer for a thread?
by boeingdream (Novice) on Nov 15, 2011 at 10:51 UTC | |
by zentara (Cardinal) on Nov 15, 2011 at 11:13 UTC | |
by Anonymous Monk on Nov 15, 2011 at 11:15 UTC |