|
|
@ -78,7 +78,7 @@ public class InvalidProtocolBufferException extends IOException { |
|
|
|
/* This write can be racy if the same exception is stored and then thrown by multiple custom |
|
|
|
/* This write can be racy if the same exception is stored and then thrown by multiple custom |
|
|
|
* InputStreams on different threads. But since it only ever moves from false->true, there's no |
|
|
|
* InputStreams on different threads. But since it only ever moves from false->true, there's no |
|
|
|
* problem. A thread checking this condition after catching this exception from a delegate |
|
|
|
* problem. A thread checking this condition after catching this exception from a delegate |
|
|
|
* stram of CodedInputStream is guaranteed to always observe true, because a write on the same |
|
|
|
* stream of CodedInputStream is guaranteed to always observe true, because a write on the same |
|
|
|
* thread set the value when the exception left the delegate. A thread checking the same |
|
|
|
* thread set the value when the exception left the delegate. A thread checking the same |
|
|
|
* condition with an exception created by CodedInputStream is guaranteed to always see false, |
|
|
|
* condition with an exception created by CodedInputStream is guaranteed to always see false, |
|
|
|
* because the exception has not been exposed to any code that could publish it to other threads |
|
|
|
* because the exception has not been exposed to any code that could publish it to other threads |
|
|
|