Re: send/expect in a loop causes CPU to choke
- From: claird@xxxxxxxxx (Cameron Laird)
- Date: Wed, 4 Apr 2007 15:18:22 +0000
In article <1175667025.037991.149650@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Sharad <sharad1087@xxxxxxxxx> wrote:
Hi.
I had a simple send/expect script that shoots up the CPU usage to 100%
on Unix server.
The script looks like this:
While {1} {
expect {
a {
.
exp_continue
}
b {
.
exp_continue
}
}
}
I understand that while loop could have been avoided but somehow the
user wrote the script like this. Somebody pointed out that using send/
expect in a while loop is causing this behavior (excess CPU
utilization) but I'm not sure about the logic behind this.
Expert advice needed.
.
.
What's the question?
Someone else wrote this. You're already aware that it's not
recommended style. You want ... well, what is it that you
want? I suspect you're trying to ask for the same behavior,
but with a lower CPU load, but I don't understand what
behavior (written by a third person) you're trying to preserve.
My summary advice: don't do that; decide what you do want to
do.
.
- Follow-Ups:
- Re: send/expect in a loop causes CPU to choke
- From: Sharad
- Re: send/expect in a loop causes CPU to choke
- References:
- send/expect in a loop causes CPU to choke
- From: Sharad
- send/expect in a loop causes CPU to choke
- Prev by Date: problems with running 32-bit tclsh on Windows x64
- Next by Date: Re: tkfbox.tcl maintainer
- Previous by thread: send/expect in a loop causes CPU to choke
- Next by thread: Re: send/expect in a loop causes CPU to choke
- Index(es):
Relevant Pages
|