in reply to Using Win32::ChangeNotify

There is no need for threading or forking. The wait() method takes a timeout in milliseconds.

So, set up a Tk->after callback that goes off every say 1/10 of a second and call

my $notifyObj = Win32::ChangeNotify( ... ); my $found = 0; my $abandoned = 0; sub checkNotify( my $rv = $notifyObj->wait( 0 ); $found = 1 if $rv = 1; $abandoned = 1 if $fv = -1; die 'Notify error' unless defined $rv; } $mainWindow->after( 100, \&checkNotify );

See Win32::IPC and Win32::Semaphore for details.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.