Asynchronous Interrupt Firing
The RTSJ provides three ways to raise an AIE. The interrupt method on RealtimeThread throws a generic AIE into the thread, the fire method on AsynchronouslyInterruptedException causes an AIE that is directed at a particular method, and at an assigned moment a Timed object throws an AIE at the run method it is given. (A thread can also just throw an AIE at itself, but then it isn't actually asynchronous.)
The Timed Class
Real-time applications frequently contain specifications like
Wait 200 milliseconds for a response, then stop the process and initiate recovery
or
Spend up to 1022 microseconds refining the computation, take the best result, and pass it to the next step in the computation
or
The thread should not ...
Get Real-Time Java™ Platform Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.