RFR: 8238761: Asynchronous handshakes [v4]

Robbin Ehn rehn at openjdk.java.net
Tue Sep 22 07:34:16 UTC 2020


On Mon, 21 Sep 2020 21:26:08 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/share/runtime/handshake.hpp line 78:
>> 
>>> 76:   FilterQueue<HandshakeOperation*> _queue;
>>> 77:   Mutex _lock;
>>> 78:   Thread* _active_handshaker;
>> 
>> Nit: can you line up the data member names for lock and _active_handshaker ?
>
> 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.

-------------

PR: https://git.openjdk.java.net/jdk/pull/151


More information about the hotspot-runtime-dev mailing list