We have just released a significant update to the ParaSail compiler and virtual machine, revision 3.0 of the alpha release 0.5:
http://bit.ly/Mx9DRb
This release is the first to support a "return" or "exit" from inside a parallel construct (such as a concurrent loop or a block with statements separated by "||"). Such a return or exit terminates all of the other picothreads inside of the construct being exited, before returning or exiting with the specified value. What this means is that you can write parallel loops or other algorithms with multiple picothreads "racing" to find the answer, with the first one to do the "exit loop with xxx;" or "return yyy;" providing the answer, with the other picothreads automatically terminated. This is a natural way to write certain kinds of parallel algorithms, and now ParaSail makes it quite easy to get the automatic shutdown and cleanup desired for such cases. A simple example "locked_exit.psl" is included in the "examples" subdirectory of the release, to illustrate such a "multi-thread" exit.
If you have any trouble downloading, installing, or testing out this new release, please don't hesitate to post a response to this note.
http://bit.ly/Mx9DRb
This release is the first to support a "return" or "exit" from inside a parallel construct (such as a concurrent loop or a block with statements separated by "||"). Such a return or exit terminates all of the other picothreads inside of the construct being exited, before returning or exiting with the specified value. What this means is that you can write parallel loops or other algorithms with multiple picothreads "racing" to find the answer, with the first one to do the "exit loop with xxx;" or "return yyy;" providing the answer, with the other picothreads automatically terminated. This is a natural way to write certain kinds of parallel algorithms, and now ParaSail makes it quite easy to get the automatic shutdown and cleanup desired for such cases. A simple example "locked_exit.psl" is included in the "examples" subdirectory of the release, to illustrate such a "multi-thread" exit.
If you have any trouble downloading, installing, or testing out this new release, please don't hesitate to post a response to this note.