Sunday, July 22, 2012

Rev 3.0 of alpha release 0.5 available; suppports multi-thread exit/return

We have just released a significant update to the ParaSail compiler and virtual machine, revision 3.0 of the alpha release 0.5:

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.


  1. A minor update to this release was just uploaded, numbered 3.0.1. This fixes a problem with the new return/exit from a concurrent construct. It wasn't working if there were multiple picothreads on the delay queue at the time of the return/exit. Now it handles that properly. This new feature is used in a slightly updated version of the "Drinking Philosophers" solution, examples/drinking_phils.psl. It used to use polling to decide when the drinking party was over, and it took a while for all the philosophers to finish their thinking and notice the big sign telling them to go home. Now, when the party is over, the party is over! No more dilly-dallying around for those philosophers...

  2. Another update to this release was just uploaded, numbered 3.1. This fixes a number of problems relating to nested interfaces, polymorphic objects where the wrapped object is a small object, and extending interfaces which have some operations that are visible only for implementing some other interface (following the implements separator in the list of operations), such as Integer (it has four extra operations used for implementing the "Countable" interface).

    The same "" link given above works for this new release: