[Prev][Next][Index][Thread]

# Re: Network output buffer

- Date: Thu, 4 Jan 1996 22:16:43 PST
- From:
- Cc: Martian <martian@server.elysian.net>, moo-cows@parc.xerox.com
- Content-Type: text/plain; charset="us-ascii"

    At 20:35 1/4/96, ThwartedEfforts wrote:
    >At 11:14 AM 1/4/96 PST, you wrote:
    >> for Line in (htext)
    >>   notify(player, Line, 1);
    >>   if ($command_utils:running_out_of_time())
    >>     suspend(0);
    >>   endif
    >> endfor
    >> suspend(1);
    >> boot_player(player);
    >
    >First off, you are dropping the return value of notify() on the floor
    >instead of using it:
    >
    >for Line in (htext)
    >  while (!notify(player, Line, 1))
    >    suspend(1);
    >  endwhile
    >  $command_utils:suspend_if_needed(0);
    >endfor
    >

    Actually....

    for Line in (htext)
      while (notify(player, Line, 1) == 0)
         suspend(1);
      endwhile
    $command_utils:suspend_if_needed(0);
    endfor

    Should avoid infinite loops if typeof(Line) != STR

    Just my $0.02

    Janus

    ---
    "640K ought to be enough for anybody."
        -- Bill Gates, 1981

- Prev: Re: Network output buffer
- Next: Re: Network output buffer
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index