In First code snippet, Threads are created in the order same as their textual order in the source program.
Result(4) is always the same for both codes because in concurrent version runtime execution order of threads is implicitly restricted by the dataflow behavior of the variables and is same as that of sequential version.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment