RFR 8145127: VM warning: WaitForMultipleObjects timed out (0) ...

Ivan Gerasimov ivan.gerasimov at oracle.com
Thu Dec 17 08:23:18 UTC 2015



On 17.12.2015 8:45, David Holmes wrote:
> On 15/12/2015 10:18 PM, Ivan Gerasimov wrote:
>>
>>>
>>> while(true) would convey that much more clearly - and perhaps obviate
>>> the need for pr_ex.
>>>
>>
>> Yes, I can surely transform the code
>>
>> -      while (pr_ex != curr_id) {
>> +      if (pr_ex != curr_id) {
>> +          while (true} {
>>
>> The intention was to save a line :-)
>>
>> I'll use while (true), if it improves readability.
>
> It does :) And I don't you need pr_ex then as you can just compare 
> OrderAccess::load_acquire(&process_exiting) with the current thread id 
> - right?
>

We will suspend the current thread if two conditions are satisfied: 
process_exiting != 0 and process_exiting != current thread id.
But, yes, pr_ex isn't really needed, as we can use process_exiting directly.

Here's the updated webrev:
http://cr.openjdk.java.net/~igerasim/8145127/01/webrev/


Sincerely yours,
Ivan



More information about the hotspot-runtime-dev mailing list