@article { , title = {Alting barriers: synchronisation with choice in Java using JCSP}, abstract = {Communicating Sequential Processes for Java (JCSP) is a mature library that implements CSP-derived concurrency primitives in Java. A JCSP system is a hierarchical network of autonomous processes communicating over synchronous (optionally buffered) channels, and multiway synchronising through barriers. This paper presents a significant extension to the barrier mechanism: the fast resolution of choice between any number of barrier events, channel communications (in either direction) and timeouts. Previously, and in line with all currently released libraries and languages offering the CSP concurrency model, choice was restricted to channel inputs and timeouts. The paper demonstrates an application of alting barriers and explains the mechanisms used in their implementation that enables their use as guards in a choice. It also shows how choice over channel outputs becomes possible, as a simple consequence of having choice over barriers. Finally, an efficient implementation of CSP's broadcasting channels is presented (using a phased barrier synchronisation pattern) and a mechanism for allowing choice over these is discussed. With this extended JCSP, almost all CSP-specified systems can now be directly implemented. The new library is available under LGPL open source}, doi = {10.1002/cpe.1471}, issn = {1532-0626}, issue = {8}, note = {School: sch\_comp}, pages = {1049-1062}, publicationstatus = {Published}, publisher = {Wiley}, url = {http://researchrepository.napier.ac.uk/id/eprint/3822}, volume = {22}, keyword = {005 Computer programming, programs & data, QA75 Electronic computers. Computer science, Software systems, Centre for Algorithms, Visualisation and Evolving Systems, AI and Technologies, Theoretical Computer Science, Computer Networks and Communications, Computational Theory and Mathematics, Software, Computer Science Applications}, year = {2010}, author = {Welch, Peter and Brown, Neil and Moores, James and Chalmers, Kevin and Sputh, Bernhard} }