|
robert Wanderer
Joined: 25 Feb 2004 Posts: 98
|
Posted: Fri Aug 08, 2008 4:14 am
[2.35 Pro] Alarm thread seemingly can not create another alarm anymore. |
Hey All,
After upgrading to 2.35 from I think 2.15, a alarm loop stopped working. It is fairly simple:
#ALIAS workdo {#SA Does work;#ALARM workalarm {+%random( 7, 23)} {workdo}}
Before this would keep going forever. Now it executes twice then stops. It seems that an alarm thread can no longer start up another alarm thread? I also tried using a #VAR and a local instead of the straight random proc call. This a bug, or as intended now? |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Aug 08, 2008 7:46 pm |
This should do what you want, and will be much smoother and faster.
#ALIAS workdo {#SA Does work;#T+ workalarm}
#ALARM workalarm {*%random( 7, 23)} {workdo}} |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
robert Wanderer
Joined: 25 Feb 2004 Posts: 98
|
Posted: Sat Aug 09, 2008 1:55 am |
Vijilante wrote: |
This should do what you want, and will be much smoother and faster.
#ALIAS workdo {#SA Does work;#T+ workalarm}
#ALARM workalarm {*%random( 7, 23)} {workdo}} |
I tried the above, but the delay is the same with each iteration. I believe that was true before and is why I did the + type ALARM. I also tried #SUSPEND on it and then restart, but this still results in the issue an ALARM can not seemingly create an ALARM. |
|
|
|
robert Wanderer
Joined: 25 Feb 2004 Posts: 98
|
Posted: Tue Aug 12, 2008 10:00 pm |
FYI, I tried a new alarm setup which seems to work fine for me.
#ALIAS workdo {#SA Does work;#ALARM workalarm1 {+6} {#ALARM workalarm2 {+%random(1,17)} {workdo}}}
So it seems an alarm can not redeclare itself to alter it's timeout, and also a * alarm can not have it's timeout period changed if it is a variable or a function based timeout.
I don't think that an alarm can not modify itself is documented in the help, but the second part that the timeout will not change is stated. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Aug 12, 2008 10:34 pm |
You change the timeout of an alarm using the %alarm function, not by trying to use the #ALARM command again.
|
|
|
|
|
|