Non-blocking mode I/O either transfers at least one byte or returns immediately with an error or end of stream.
As the title suggests, I'm looking for a compare-and-swap implementation, but with greater-than comparison: if(newValue > oldValue) { oldValue = newValue; } …
java multithreading synchronization nonblocking