in reply to Re^6: Scope of thread variable
in thread Scope of thread variable

is_running()

Replies are listed 'Best First'.
Re^8: Scope of thread variable
by mr_p (Scribe) on Apr 08, 2010 at 17:31 UTC
    How do I do that for forked threads?

      Dunno! I don't know how to fork a thread.

        This is what I meant:
        # some code here.... for (0 ..3)) { my $thr = threads->create ( sub { worker(); } )->detach(); } # Master Thread while (1) { master(); }

        How can master() function monitor the threads that were created?

        I am new at threads, sorry for mis-understanding.