Help for this page

Select Code to Download


  1. or download this
    # update shared counters
    use threads;
    ...
        $MsgCnt++;
        $TotalBytes += $bytesThisemail;
    } # lock released at end of enclosing scope
    
  2. or download this
    # update shared counters
    use threads;
    ...
        lock $TotalsLock;  # I have locked access
        print "Activity Totals: $MsgCnt $TotalBytes]n";
    } # lock released at end of enclosing scope