nats.java
nats.java copied to clipboard
ReentrantLock instead of synchronized
- Use ReentrantLock in place of synchronized since it's better for virtual threads and equally if not more performant.
- Ensure consumer context implementation is thread safe and switch to reentrant lock instead of synchronized.