[Lula] Perl and Sleep problem

Samuel Gasster muondude at yahoo.com
Wed Apr 16 21:29:12 EDT 2008



----- Original Message ----
From: John R. Hogerhuis <jhoger at pobox.com>
To: lula at lula.org
Sent: Monday, April 14, 2008 9:01:59 PM
Subject: Re: [Lula] Perl and Sleep problem

On Mon, Apr 14, 2008 at 8:21 PM, Samuel Gasster <muondude at yahoo.com> wrote:
> I have been asked to help debug a Perl script problem - but it may be in fact an OS problem.

I've never had this problem. It seems unlikely...

I was unable to reproduce this on any Mac or Linux, but it was really happening on the WinXP system.

Are you sleeping on a scalar variable or a constant value? Are you
operating in a single thread? Are you dependent upon any XS code?

constant value
not sure about the thread issue - good point.
XS code - I don't think so...


I guess you could try stuff:
Another way to sleep is to use select() routine with a timeout .

that was one of my first suggestions select(undef, undef, undef, $sleep_time);

Thanks.  ;-)

Another thing you could try: I tend to use the HiRes timer package.

Worse case, you could multiply your "delay time" by some value and
loop that amount of time on some busy wait. Interesting as a
diagnostic, anyway. Or you could system() out to some C routine that
you know does a proper delay.

http://malektips.com/xp_dos_0002.html

-- John.

_______________________________________________
Lula mailing list
Lula at lula.org
http://lula.org/mailman/listinfo/lula_lula.org



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


More information about the Lula mailing list