Legacy Code

The quantity of existing code in class libraries and other forms of Java components is one of the great assets of the Java programming language. Since most of this code was not written with any consideration for real-time issues, it needs to be used cautiously, but it would be foolish to insist that RTSJ applications start fresh. That is an important reason for the decision to make methods defer async exceptions by default. It is safe to throw an async exception at a method that was not written to handle it. If the method was coded to poll for the old-style thread interrupt, it will see the interrupted flag. If it was oblivious to interrupts, it will be oblivious to RTSJ interrupt. The only problem is, of course, that the async exception ...

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.