[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: delay in perlscripts?
Decklin Foster wrote:
> Now, a question for the rest of the group. What do we do when sleep()
> is replaced by sub_which_performs_several_seconds_of_computation()?
Exacly the same thing. The concept here is that X-Chat is running, or the
embedded perl interpreter is running, but not both at the same time.
> I sort of suspect that IRC::blah is just pushing commands onto a queue
> that gets flushed whenever the code dips back into XChat. But I don't
> know the internals.
That's the idea behind it... the best way to get a correct delay is by doing
this: (pseudo code follows)
dowhatever {
pre-delay-stuff
IRC::add_timeout_handler(delay,"post-delay-routine")
}
post-delay-routine {
post-delay-stuff
}
--
Mike Guidero [KD7ILU] - Genius in disguise.
*** aibohphobia, n., The fear of palindromes. ***
PGP Public Key: (Unavailable at this time)
Fingerprint : DD87 C663 1767 B11F 1EDE D2AA 0DD1 89C6 56D7 109A
-
XChat-discuss: mailing list for XChat users
Archive: http://mail.nl.linux.org/lists/
Posted By: Mike Guidero <kymermosst@penguinpowered.com>