6993267: TEST_BUG: java/nio/file/Path/InterruptCopy.java fails intermittently (win)

Rémi Forax forax at univ-mlv.fr
Thu Oct 21 06:08:51 PDT 2010


Le 21/10/2010 14:46, Alan Bateman a écrit :
> Rémi Forax wrote:
>> :
>> Hi Alan,
>> if wakeup task is interrupted, you should throw an assertion error,
>> it should never happen.
>>
>> so line 102 should be
>>
>> } catch (InterruptedException e) {
>>   throw (AssertionError)new Assertionerror().initCause(e);
>> }
>>
>>
>> Otherwise, it's Ok.
>>
>> Rémi
>>
> The wakeup task interrupts the main thread, so if the copy (on the 
> main thread) is really fast then the main thread may be blocked in 
> wakeup.get when it is interrupted. So I think I have it right, and 
> it's easy to demonstrate by copying a very small file.
>
> -Alan.

Ok, got it.

Yes, you're right.

Rémi


More information about the nio-dev mailing list