A pragma that can be used to declare that a particular method is logically
uninterruptible even though it contains bytecodes that are actually
interruptible.
The effect of this pragma is to suppress warning messages about violations of
uninterruptiblity when compiling a method that throws this exception. There
are two cases in which using the pragma is justified.
- Uninterruptibility is ensured via some other mechanism. For example, the
method explicitly disables threadswitching around the interruptible regions
(VM.sysWrite on String). Or the interruptible regions are not reachable when
the VM is running (various VM.sysWrite that check VM.runningVM).
- The interruptible regions represent an 'error' condition that will never
be executed unless the VM is already in the process of reporting an error,
for example RuntimeEntrypoints.raiseClassCastException.
Extreme care must be exercised when using this pragma since it suppresses the
checking of uninterruptibility.
Use of this pragma is being phased out since it lumps together two possible
special cases. Use either Unpreemptible
or
UninterruptibleNoWarn
instead.
See RVM-115 for more
context.