Losing EVENT:Timer? 
Author Message
 Losing EVENT:Timer?

I have an application that has a few threads launched with START() that each
have a window with a timer value.  It seems that suddenly threads appear to
be simply stopping.  I place a value on each window that I toggle each time
I enter the EVENT:Timer section so this is how I know the thread stops
receiving (or processing) EVENT:Timer messages.  The thing is these threads
were all working fine.  I did not touch the code in these threads.

I'm very curious to know under what conditions can such an occurrence
happen???  Does anybody have any experience with this?

Any timely replies would be very appreciated!

                            -Ray.

(remove trailing "xxx" in reply e-mail address to reply)



Sat, 31 Mar 2001 03:00:00 GMT  
 Losing EVENT:Timer?
Ray,
The way I understand it is that the multi-thread scheme used by Clarion is
cooperative.  This means that if you have a process in any thread that does
not allow the accept loop to cycle, then no other threaded process will
cycle through its accept loop (this includes timer events).

If you have something like:

Loop 1000000 Times
  (some code)
End

Nothing else in any thread will execute.  The way around this is to limit
the amount of processing in all threads (by using a timer), or put a "Yield"
command inside the loop above so that it looks like:

Loop 1000000 Times
  Yield
  (some code)
End

HTH,
Bill Roe

Quote:

>I have an application that has a few threads launched with START() that
each
>have a window with a timer value.  It seems that suddenly threads appear to
>be simply stopping.  I place a value on each window that I toggle each time
>I enter the EVENT:Timer section so this is how I know the thread stops
>receiving (or processing) EVENT:Timer messages.  The thing is these threads
>were all working fine.  I did not touch the code in these threads.

>I'm very curious to know under what conditions can such an occurrence
>happen???  Does anybody have any experience with this?

>Any timely replies would be very appreciated!

>                            -Ray.

>(remove trailing "xxx" in reply e-mail address to reply)



Sat, 31 Mar 2001 03:00:00 GMT  
 Losing EVENT:Timer?
To check if the prop:timer is getting messed with, you could add the
following:
On each screen, put a numeric field in the upper corner.
In your code, just after the accept, put the following
MyVariable = window{prop:timer}
display

You should also do this any place that you could be cycling, just to
make sure you hit it after the prop changes.

HTH!

Quote:

> I have an application that has a few threads launched with START() that each
> have a window with a timer value.  It seems that suddenly threads appear to
> be simply stopping.  I place a value on each window that I toggle each time
> I enter the EVENT:Timer section so this is how I know the thread stops
> receiving (or processing) EVENT:Timer messages.  The thing is these threads
> were all working fine.  I did not touch the code in these threads.

> I'm very curious to know under what conditions can such an occurrence
> happen???  Does anybody have any experience with this?

> Any timely replies would be very appreciated!

>                             -Ray.

> (remove trailing "xxx" in reply e-mail address to reply)



Sat, 31 Mar 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Triggering a Timer's action event

2. do timer events always arrive?

3. Window events/openW vs Timer

4. event timer prob???

5. Timer event

6. TIMER Events

7. Is this a timer event?

8. Message Box corrects problem in code in Windows Timer event

9. Refresh Browse on timer event

10. EVENT:Timer - looping through a file

11. Window Event Handling - Timer - HELP

12. Iconized C4/C4A app not firing timer events

 

 
Powered by phpBB® Forum Software