MOOPH = Module for Object Oriented Pseudomultithreaded Hypertext - Example 1


JavaScript single file applications are not really multithreaded now. Two pseudothreads of execution run in this example in pseudoparallel (it looks like they run in parallel but they don't, they run one after each other). One of them is a very simple function that adds one to a variable and the other one is a function, that displays that variable and resets its value to zero. The pseudothread that displays the variable is paused between second and fourth second and the pseudothread that adds to the variable is paused between fifth and seventh second. It is possible to set how displaying pseudothread works using the form (some difference is seen when you focus on different tab after setting "is measured from last time").

Measured delay of the pseudothread that displays the variable:  

Set displaying pseudothread to "is measured from last time".
Set displaying pseudothread to "is measured from now".


© 2013-2015 Cenek Svoboda, svobo.c@gmail.com