use threads; use threads::shared; my $rw = 0; cond_signal $rw;