This has several implications; among them the fact that functions can be easily calculated in parallel, using multithreading.
When the system is configured to allow multithreading (this depends by the project and machine settings), at any time each function calculation is done in a different thread.
The following picture shows a case of multithreading in Matrex: the GUI works in parallel as 4 functions, running in 3 separate threads:
Threads are extracted from a pool of threads, so it is garanteed that:
- there is no performance degradation related to the threads creation.
- the number of threads grows in a controlled way.
- a function calculation that takes a long time does not stop the entire system.
- functions are calculated potentially as soon as their input parameters are available (or changed).
- the GUI is not blocking during calculations.
In fact, there is no circularity: a matrix can be a result value of only one function, and it cannot be parameter to the same function, directly or indirectly.
No circularity, no deadlock.