Postby Lapo » 16 Sep 2019, 15:19
Hi,
there is no specific limit. Essentially it depends on these variables:
1) number of threads in the Scheduler
2) how frequent your tasks are
3) how long does it take for a task to complete
4) the number of tasks
Example
1) Scheduler uses 1 thread
2) Tasks run every second
3) A task completes in 10ms
4) We run 20 tasks
We only run one thread so these tasks will execute in sequence. Because every task completes quickly (10ms) it will take 20x10ms = 200ms to complete them all which is good. All the tasks will complete before it's time to run again.
However if you imagine that the task now takes 100ms, we have a problem. The total execution time for all tasks exceeds their requested interval (once per second) so they will end up running late, not on schedule anymore.
To fix the problem you can add more threads, so that when one thread is busy the other can keep up with the work and avoid delays.
Hope it helps