[futurebasic] Re: [FB] What time do you have

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 2002 : Group Archive : Group : All Groups

From: Pete Beaumont <furbies@...>
Date: Tue, 30 Apr 2002 05:20:24 +1000
On Tuesday, April 30, 2002, at 03:09  AM, Edwards, Waverly wrote:

>
>
> I've been working on a very processor intensive program.
> I was told that it takes too long, so I ran it on a huge
> file and while it didn't take long on my machine I could
> see how it could take long on another.  I'll have to try
> this out on my PB5300.
>
> Since the program is processor intensive (a euphemism for
> a processor hog -- but with cause) I investigated ways of
> giving up processor time without making my program come
> to a complete halt.  I only found one way of giving up
> processor time which wasn't really great anyway according
> to Apple.  I used eventAvail(_everyEvent,0) but Apple
> states that suspend/resume event get stuck in limbo when
> you do this.
>
> I did it anyway as experiment.  On my machine processing
> what I thought was a huge file the time variance from
> start to finish was 7.1 to 7.3 seconds.  When I added
> eventAvail to the processing loop the processing time climbed
> to dramatically.  It varied between 61 and 63 seconds.
>
> I haven't used threads before but I have read that some threads
> cant complete before others.  My concern with that is information
> will be written out of order.  I don't know if that's valid or not
> as my knowledge of threads is very sparse.

You could use Threads.
The 'entire process' could be spun off as a single thread, and 
then you wouldn't
have to worry about writing data out of turn.

I've started playing with threads, and it's fairly easy.
(He say's while shooting self in the foot)

>
> Does anyone have a suggestion on how I could give up processor
> time and not multiply my processing time?
>
>
> W.
>
> --
> To unsubscribe, send ANY message to <futurebasic-
> unsubscribe@...>
>
>
>

Pete…                          (the other one)