in reply to stopping a thread in wxPerl?

... a thread must return for it to stop ( other than killing it)..... it seems you enqueue 'Stop', but maybe work on a better, more direct way?
while (my $message = $event->dequeue ) { print "IN HERE\n"; return 1 if $message eq 'STOP';
... maybe $event->dequeue is hanging? ..... maybe experiment there with a counter and see how many times it prints STOP and figure out why it dosn't return ?

... maybe try a time delay to give the eventloop enough loop time to get it all done?

$self->{queue}->enqueue('STOP'); # insert a small Wx time delay here, or use a conditional in the join +like: do 1 until $self->{worker}->join; #or code to wait for the thread count to change }
in other words find the best Wx way to wait there for the thread to return

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