Re: Use of multiple loops
[email protected] (Joshua N Pritikin) Tue, 25 May 2004 21:21:12 +0530
| Newsgroups | perl.loop |
|---|---|
| Message-ID | <[email protected]> |
On Mon, May 24, 2004 at 07:13:12PM +0000, Ton Hospel wrote:
> The docs don't seem to mention what happens to an Event loop() if there
> are no event sources anymore. I hoped it would unloop automagically,
Yah, it should.
> and it at least *seemed* to until I tried:
>
> #!/usr/bin/perl -wl
> use strict;
> use Event qw(loop unloop);
>
> my $read_refs;
> unless (@ARGV) {
> Event->timer(after => 0.1, cb => sub {
> print STDERR "auto exit";
> # unloop;
> });
> loop();
> print STDERR "exited";
> }
Try running the same with
$Event:DebugLevel = 1;
> Or is this an Event bug ?
> (all of this is with Event version 1.0 under perl 5.8.2 on a linux machine)
Yah, it's probably a bug.
--
A new cognitive theory of emotion, http://openheartlogic.org
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAs2twqcqnlKSmC70RAu2aAKDQwQ+BFiSjr8Jws8Y2c5qD7asSmwCePOJq CUpP/MpnJ6XAkmNRlUV72L0= =5YJ+ -----END PGP SIGNATURE-----