In G1HeapVerifier::verify there is this code that optimizes verification by splitting out single- and multi-threaded operation.
The way it's done is unnecessary: further, this is verification code that will take much much longer than the additional thread switch, so for code simplicity it is useful to simplify that code.
The way it's done is unnecessary: further, this is verification code that will take much much longer than the additional thread switch, so for code simplicity it is useful to simplify that code.