Re: Threads vs Processes
- Posted by Mario Steele <eumario at trilake.net> May 02, 2005
- 510 views
Mario Steele wrote: > }}} <eucode> > sequence buff > > procedure parseInfo() > -- do your error detection here > -- If there is more data to be retrived, > -- then wait for it to be retrived, > -- otherwise, if you have all the data > -- do your parsing of it, saving, or whatever > -- and pass it along to what ever needs it. > end procedure > </eucode> {{{ By waiting, I mean, simply return from the procedure, so events can continue to be received. Otherwise, you'll run into the same problem your having now. An example of this under a Telnet System would be like this:
procedure parseInfo() sequence telnet while find(10,buff) do telnet = buff[1..find(10,buff)-1] buff = buff[find(10,buff)+1..length(buff)] puts(1,"Telnet> " & telnet & "\n") end while end procedure
Mario Steele http://enchantedblade.trilake.net Attaining World Dominiation, one byte at a time...