… | |
… | |
576 | after => 1, |
576 | after => 1, |
577 | cb => sub { $result_ready->send }, |
577 | cb => sub { $result_ready->send }, |
578 | ); |
578 | ); |
579 | |
579 | |
580 | # this "blocks" (while handling events) till the callback |
580 | # this "blocks" (while handling events) till the callback |
581 | # calls -<send |
581 | # calls ->send |
582 | $result_ready->recv; |
582 | $result_ready->recv; |
583 | |
583 | |
584 | Example: wait for a timer, but take advantage of the fact that condition |
584 | Example: wait for a timer, but take advantage of the fact that condition |
585 | variables are also callable directly. |
585 | variables are also callable directly. |
586 | |
586 | |