Help for this page

Select Code to Download


  1. or download this
    async {
        while( $Q->dequeue() ) {
    ...
            ## do housekeeping.
        }
    };
    
  2. or download this
    while( my( $nfound, $timeleft) = select( ..., $timeout ) ) {
        if( $timeleft ) {
    ...
            ## deal with the event
        }
    }
    
  3. or download this
    use Time::HiRes qw[ sleep ];
    ...
    ...
                 ## Do housekeeping (if required).
            }
        }
    
  4. or download this
    async{ 1 while Win32::Sleep( 100 ); }->join;;