Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Perl6: react/whenever timeout

by OneTrueDabe (Acolyte)
on Jul 20, 2016 at 03:56 UTC ( [id://1168103]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl6
    
    ...
       } elsif $timeout { say "Timeout"; last }
    }
    say "Finished";
    
  2. or download this
    react {
        whenever $c -> $item { say qq|Got: "$item"| }
        whenever Promise.in(5) { say "Timeout"; done }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1168103]
Approved by kcott
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-25 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found