Package org.jcsp.lang

# Class ProcessInterruptedException

java.lang.Object
java.lang.Throwable
java.lang.Error
org.jcsp.lang.ProcessInterruptedException

All Implemented Interfaces:
  `Serializable`

public class ProcessInterruptedException extends Error
This is thrown if a process is interrupted whilst blocked during synchronisation - processes should never be interrupted.

## Description

This is caused by accessing the Java thread executing a JCSP process and invoking its `java.lang.Thread.interrupt`() method. If this is done to a process blocked on a JCSP synchronisation primitive (such as a channel communication or timeout), the process will wake up prematurely -- invalidating the semantics of that primitive. The wake up is intercepted and this `Error` is thrown.

Some browsers, when shutting down an applet, may do this to processes spawned by an `ActiveApplet` that have not died naturally. Alternatively, this may be raised by processes stopped prematurely as a result of a call to `Parallel.destroy`, or by calling `stop` on the `ProcessManager` responsible for the process (or network).

Author:
  P.H. Welch
See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`ProcessInterruptedException(String s)`

## Method Summary

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### ProcessInterruptedException

public ProcessInterruptedException(String s)