Hacker News new | ask | show | jobs
by cypressious 1359 days ago
Does you library use any of the JDK's blocking APIs like Thread.sleep, Socket or FileInputStream directly or transitively? If so, it is already compatible. The only thing you should check is if you're using monitors for synchronization which are currently causing the carrier thread to get pinned. The recommendation is to use locks instead.
1 comments

Monitors as in the synchronized keyword? Because that is kind of a big one.
Yes but it only really matters if you're blocking on IO whilst inside a synchronized block. If you're using it to protect in-memory data structures then it's not a big deal.