[607] in Coldmud discussion meeting
Odd behavior (related to suspend()/resume() ?)
daemon@ATHENA.MIT.EDU (Fri Dec 2 11:59:33 1994
)
From: brandon@avon.declab.usu.edu
To: coldstuff@MIT.EDU
Cc: tcd@tiny.mcs.usu.edu
Date: Fri, 02 Dec 94 09:57:14 -0700
I recently upgraded .read() in the Cold Dark to use suspend() and resume().
Immediately thereafter odd behavior began. The reason for this post
is I have no idea what could be happening. The problem _could_ be in my
db, but it could also be with what suspend() actually effects. I have only
noticed the problem when pasting a series of methods (i.e. each one begins
with a suspend() and ends with a resume()). The problem will crop up on
about the 3rd/4rth + methods. What it does is simply skip the first ~1-5
lines of the method, 'sending' them to the parser after the .read() method
was resumed. However Jeff has noticed it one just one method, when using
/paste (/quote) in vt. For instance, the sequencing:
line: @program ...
parsing: .read() is called, suspending task while next lines are read
line: arg ...
parsing: (never seen)
line: ...
parsing: (never seen)
line: code
parsing: added to list of read lines
line: code
parsing: added to list of read lines
[...]
line: .
parsing: .read() completes, resuming the task()
parsing: arg ... (appears here)
parsing: ... (appears here)
As an example, I inserted a debug into parse_line on $user. The first bit
represents whether or not the input parser is in the user's parser stack:
-----------------
Method @pasted in:
@program .xxx
arg xxx;
if ($xxx != this())
throw(~perm, "xxx");
sender().tell("xxx random lines");
sender().tell("xxx second random line");
sender().tell("xxx random statement");
.
-----------------
Debug output:
debug: 0 @program .xxx
-- Enter text for $brandon.xxx --
debug: 1
debug: 1 if ($xxx != this())
debug: 1 throw(~perm, "xxx");
debug: 1 sender().tell("xxx random lines");
debug: 1 sender().tell("xxx second random line");
debug: 1 sender().tell("xxx random statement");
debug: 1 .
Method compiled.
debug: 0 arg xxx;
I don't understand " arg xxx;".
-----------------
Anybody have an idea what could be going on? The number of lines it holds
off on parsing is nearly random.
-Brandon (Lynx@the Cold Dark (telnet://recumbent.declab.usu.edu:1138))-