Implementation Notes
Implementors of wait-free queues may find that synchronized blocks are required to protect the queue data structure. Synchronized blocks are acceptable provided that the code in the synchronized blocks is brief and never allocates an object or does anything else (like calling System.gc) that could cause garbage collection. The synchronized block could cause the priority of the heap-using thread to be boosted to the level of the no-heap thread, but since the synchronized block will not run garbage collection, the priority boosting will be brief.
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.