Task parallelism: Difference between revisions

Content deleted Content added
No edit summary
JVM Example: remove this example: it only shows a different ''syntax'' for expressing the problem from the previous section, making it effectively an advertorial for the mentioned technology (JVM + commercial extension)
Line 46:
 
This concept can now be generalized to any number of processors.
 
===JVM Example===
 
Similar to the previous example, Task Parallelism is also possible using the Java Virtual Machine [[JVM]].
 
The code below illustrates task parallelism on the [[JVM]] using the commercial third-party Ateji PX extension.<ref>http://www.ateji.com/px/patterns.html#task Task Parallelism using Ateji PX, an extension of Java</ref>
Statements or blocks of statements can be composed in parallel using the || operator inside a parallel block, introduced with square brackets:
<source lang="java">
[
|| a++;
|| b++;
]
</source>
or in short form:
<source lang="java">
[ a++; || b++; ]
</source>
Each parallel statement within the composition is called a branch. We purposely avoid using the terms task or process which mean very different things in different contexts.
 
==Languages==