Branch: refs/heads/smoke-me/khw-watchdoc
  Home:   https://github.com/Perl/perl5
  Commit: 5879fae80b626df51e697aa8af539bddc7f37266
      
https://github.com/Perl/perl5/commit/5879fae80b626df51e697aa8af539bddc7f37266
  Author: Karl Williamson <k...@cpan.org>
  Date:   2022-10-21 (Fri, 21 Oct 2022)

  Changed paths:
    M t/test.pl

  Log Message:
  -----------
  t/test.pl: Fix threads signalling watchdog cancellation

Commit 4712a4c94e5974bba8ef97d68aadf2b99c0b4ff4 added the ability to
cancel a watchdog timer.  Unfortunately it doesn't work properly when
the timer method was using the thread signalling cancellation method.
This problem only shows up on slow systems under load, so the flaw
wasn't immediately discovered.  That commit lowered the incidence level
significantly.

This commit solves the problem by having the child thread detach itself,
after it sets up the needed code to handle a signal from the parent.
The parent thread signals the child, as currently when it is done
processing, but waits for the child being detached.  That is a cue to
the parent that it is safe to signal the child.


Reply via email to