<Sound Dev>  Review Request: 8178403 DirectAudio in JavaSound may hang and leak
anton.litvinov at oracle.com
Thu Jul 6 13:10:05 UTC 2017
The fix looks good. But I do not have a reviewer status.
On 05/07/2017 20:49, Phil Race wrote:
> ok. +1
> On 07/05/2017 11:06 AM, Sergey Bylokhov wrote:
>>> thread is assigned on creation and we are checking it in run() so
>>> (thread == curThread) seems like it must be true until somehow
>>> implClose() is called :
>>> So why not just check if (thread == null) instead ?
>> This is because we assign the "thread" in the open() method, not in
>> the constructor. If the user will call open->close->open, then two
>> threads will be created (the first thread should be stopped after the
>> close() was called).
>>> And when can oldThread will be null ? If someone called stop twice ?
>> If open() was not called.
>>> And why is there no thread = null assignment in implClose() ?
>> It is there:
>> 1300 Thread oldThread = thread;
>> 1301 thread = null;
>>> Shouldn't you update the test to add this new bug id ?
>> Yes, it should:
More information about the sound-dev