Re: Threads [Was: Re: 64 bit euphoria]

new topic     » goto parent     » topic index » view thread      » older message » newer message

codepilot Gmail Account wrote:
<large snip>
> Well mabey
> }}}
<eucode>
> for doc = 1 to length(documents_to_parse) do
> --doEvents won't get called but once each document
> for character = 1 to length(documents_to_parse[doc]) do
> --doEvents would get called way too offten, for each character,
> majorly slowing down the parsing
> end for
> end for
> </eucode>
{{{


Okay, this is why I hate being right.  See, in a Single Threaded enviroment,
YES, this would be correct, calling doEvents() in the doc loop, would be
called to little, doEvents() in the character loop, would be to much.  BUT,
when you fork (Or whatever Rob decides), the document loop off into it's own
thread, it will operate SEPERATELY from the Main Thread, leaving the Main
Thread to still be able to receive the Events from the window, without being
stopped by the for loop.  And therefore, it would eliminate the need to have
the doEvents() function in either of the loops.

Mario Steele
http://enchantedblade.trilake.net
Attaining World Dominiation, one byte at a time...

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu