in reply to Re^2: detach for threads
in thread detach for threads

As you experiment more with threads, you may see the warning " A thread exited while %d other threads were still running", that is caused by the main thread finishing before the spawned threads. Also watch out for using "exit" or "die" in thread code blocks, that will exit the entire program.

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^4: detach for threads
by Sewi (Friar) on Nov 15, 2011 at 11:00 UTC

      Yes. In this case however, the program exits, before the thread gets a chance to run, so no output, and no errors