Re: Threads vs Processes
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...
|
Not Categorized, Please Help
|
|