In a multitasking environment, you take what you can get. So a forever loop tries to eat up the cpu. Inserting a wait 0.002 (I found the number by experiment on Win/Lin two years ago) behaviour is normal.
Especially when doing: some-port-list forever [ wait/all compose [ (some-port-list) 0] .... ] when I changed the 0 to 0.002 I had a high-performance, non-blocking IO-engine that turned into RUgby a few months later. And didn't ate the CPU..... --Maarten Paul Tretter wrote: >Seems to be a consensus developing. Is this how other languages handle this >issue also? > >Paul Tretter > >----- Original Message ----- >From: "Tom Conlin" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Saturday, February 07, 2004 5:29 PM >Subject: [REBOL] Re: forever loops and cpu usage > > > > >> >> >>forever [time: do now/time wait 1] >> >> >>On Sat, 7 Feb 2004, Paul Tretter wrote: >> >> >> >>>What are some ways to minimize cpu usage in forever loops? >>> >>>such as: >>> >>>forever [time: do now/time] >>> >>>Alot of scripts I make that use Forever loops end up eating the cpu. >>> >>>Paul Tretter >>> >>> >>>--- >>>Outgoing mail is certified Virus Free. >>>Checked by AVG anti-virus system (http://www.grisoft.com). >>>Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004 >>>-- >>>To unsubscribe from this list, just send an email to >>>[EMAIL PROTECTED] with unsubscribe as the subject. >>> >>> >>> >>-- >>To unsubscribe from this list, just send an email to >>[EMAIL PROTECTED] with unsubscribe as the subject. >> >> >> > > >--- >Outgoing mail is certified Virus Free. >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004 > > > -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.