Fred-Fish-DBUG

 view release on metacpan or  search on metacpan

DBUG.pm  view on Meta::CPAN

but still recommended.

But what happens with the B<second> option if you reuse the same filename
between threads?  In that case this module is B<not> thread-safe!  Each thread
can step on each other.  You can limit the impact with a creative combination
of options to DBUG_PUSH(), but you can't reliably remove all the corruption
and dropped lines in the shared B<fish> logs.  And your work around may
break in future releases of this module.

As a reminder, when the main process (I<thread # 0>) terminates, this causes
all the child threads to terminate as well.  Even if they are still busy.
Also child threads do not normally call I<BEGIN> and/or I<END> blocks of code!
And all threads share the same PID.

=head1 FISH FOR MULTI-PROCESS PERL PROGRAMS

This is when you spawn a child process using B<fork>.  In this case all
processes have a unique PID and each child process will call their own I<END>
blocks.  But otherwise it follows the same B<fish> rules as multi-threading.

When the parent process terminates, it allows any running child process to



( run in 0.244 second using v1.01-cache-2.11-cpan-87723dcf8b7 )