Function Calling
A function is called that takes approx 500msec to process
If the function is called again 250ms later.
Does the fuction Break and start again?
Comments
-
In my experience, the 2nd call to the function just waits, but does eventually get processed. I think AMX controllers are still a single-threaded runtime environment. If you repeatedly call the same function faster than the function can process, you'll eventually break something somewhere, I just don't know where that point of failure is. Other more experienced programmers may be able to provide more detail on these kinds of limits.
-
Is there a wait in the function and that’s why it takes 500ms? If that’s the case the function can be called again and run but the pending wait will not be put into another wait or reset unless you cancel that named wait then the wait can be set again. So the wait will trigger after the first call of the function wait time times out which may or may not have the desired affect depending on what’s change during subsequent calls of the function.
Maybe showing the code and explaining its desired purpose would help folks better answer your question.
-
I do not put waits in function calls. I have found that their behavior is not predictable. I usually just send things that need to be timed to a timeline. The function is really just preparation to run the timeline. Plus with a timeline and queue you can have many multiple calls that never run into each other.
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums
