Async Event Handlers and Non-Heap Memory

An async event handler can perform like a no-heap realtime thread, but the distinction is a constructor parameter, not a whole new class. If an AsyncEventHandler is constructed with the no-heap parameter true, the Java runtime will execute that AEH with the same reference tests (see “Rules” on page 229) and performance advantages (see “Interaction with Scheduler” on page 227) as a no-heap thread.

An async event handler that is constructed in scoped memory inherits the scope stack of the thread that creates it just as if it were a thread. This becomes important when the AIE needs to communicate with threads. It can always communicate through immortal memory, but if it uses scoped memory, it can share memory ...

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.