On Tue, 22 Sep 2020 07:20:30 GMT, Robbin Ehn <r...@openjdk.org> wrote:
>> FilterQueue<HandshakeOperation*> _queue; >> JavaThread* _handshakee; >> Mutex _lock; >> Thread* _active_handshaker; >> >> Isn't this nicer? (it didn't keep the formatting in the comment) > > The order of members matter since C++ initialize them in declared order. > My opinion when changing this was that it was easier to read when passing the > only argument to the first member being > initialized, thus _handshakee must be first member. > But I should init _active_handshaker in constructor, so added that and > lined-up. > > So before I do any such change please reflect over how the constructor will > look like. I don't understand, you'd have to rearrange the initializers in the constructor too, but I don't see any order dependance. Moving over _lock helps, so this is fine. ------------- PR: https://git.openjdk.java.net/jdk/pull/151