Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v3]

2024-10-02 Thread duke
On Mon, 30 Sep 2024 16:11:14 GMT, sbgoog wrote: >> FIleSystemPreferences.lockFile() catches an InterruptedException and just >> returns false, forgetting to re-interrupt the current thread. This leaves >> the caller with no way to observe that the thread was interrupted. This >> change restore

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v3]

2024-10-02 Thread Vyom Tewari
On Mon, 30 Sep 2024 16:11:14 GMT, sbgoog wrote: >> FIleSystemPreferences.lockFile() catches an InterruptedException and just >> returns false, forgetting to re-interrupt the current thread. This leaves >> the caller with no way to observe that the thread was interrupted. This >> change restore

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v3]

2024-10-01 Thread Brian Burkhalter
On Mon, 30 Sep 2024 16:11:14 GMT, sbgoog wrote: >> FIleSystemPreferences.lockFile() catches an InterruptedException and just >> returns false, forgetting to re-interrupt the current thread. This leaves >> the caller with no way to observe that the thread was interrupted. This >> change restore

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v3]

2024-09-30 Thread Daniel Jeliński
On Mon, 30 Sep 2024 16:11:14 GMT, sbgoog wrote: >> FIleSystemPreferences.lockFile() catches an InterruptedException and just >> returns false, forgetting to re-interrupt the current thread. This leaves >> the caller with no way to observe that the thread was interrupted. This >> change restore

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v2]

2024-09-30 Thread sbgoog
On Mon, 30 Sep 2024 15:58:53 GMT, Daniel Jeliński wrote: > For future reference, as the bot says, don't force push. The bot will squash > all commits before merging. I didn't realize before pushing, but now I know. Thanks! > The change looks good to me. Please update the copyright year. I've

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v3]

2024-09-30 Thread sbgoog
> FIleSystemPreferences.lockFile() catches an InterruptedException and just > returns false, forgetting to re-interrupt the current thread. This leaves the > caller with no way to observe that the thread was interrupted. This change > restores the interrupted status on the current thread before

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v2]

2024-09-30 Thread Daniel Jeliński
On Mon, 30 Sep 2024 14:31:51 GMT, sbgoog wrote: >> FIleSystemPreferences.lockFile() catches an InterruptedException and just >> returns false, forgetting to re-interrupt the current thread. This leaves >> the caller with no way to observe that the thread was interrupted. This >> change restore

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v2]

2024-09-30 Thread Daniel Fuchs
On Mon, 30 Sep 2024 14:29:03 GMT, sbgoog wrote: >> In which case the code might be simplified to just: >> >> } catch (InterruptedException e) { >> // Don't lose the interrupt >> Thread.currentThread().interrupt(); >> break; >>

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v2]

2024-09-30 Thread sbgoog
On Mon, 30 Sep 2024 14:06:35 GMT, Daniel Fuchs wrote: >> The status might not be explicitly checked, but setting the interrupted >> status will make sure that subsequent calls to sleep/await/tryLock etc. will >> not block. >> >> In general, we want to preserve the interrupted status until eith

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v2]

2024-09-30 Thread sbgoog
> FIleSystemPreferences.lockFile() catches an InterruptedException and just > returns false, forgetting to re-interrupt the current thread. This leaves the > caller with no way to observe that the thread was interrupted. This change > restores the interrupted status on the current thread before

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile()

2024-09-30 Thread Daniel Fuchs
On Mon, 30 Sep 2024 13:46:55 GMT, Daniel Jeliński wrote: >> I thought that if an access error is found, then that would take precedence >> over the interrupt, especially since it occurs before the sleep. I was more >> concerned with just returning false and the caller not knowing if it's false

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile()

2024-09-30 Thread Daniel Jeliński
On Mon, 30 Sep 2024 13:07:42 GMT, sbgoog wrote: >> src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java line >> 961: >> >>> 959: } catch(InterruptedException e) { >>> 960: checkLockFile0ErrorCode(errorCode); >>> 961: // Don't lose th

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile()

2024-09-30 Thread sbgoog
On Fri, 27 Sep 2024 18:46:54 GMT, Daniel Jeliński wrote: >> FIleSystemPreferences.lockFile() catches an InterruptedException and just >> returns false, forgetting to re-interrupt the current thread. This leaves >> the caller with no way to observe that the thread was interrupted. This >> chang

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile()

2024-09-27 Thread Daniel Jeliński
On Tue, 10 Sep 2024 16:37:11 GMT, sbgoog wrote: > FIleSystemPreferences.lockFile() catches an InterruptedException and just > returns false, forgetting to re-interrupt the current thread. This leaves the > caller with no way to observe that the thread was interrupted. This change > restores th

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile()

2024-09-27 Thread Brian Burkhalter
On Fri, 27 Sep 2024 14:38:56 GMT, sbgoog wrote: > This PR needs another reviewer. Is there someone that can have a look at it? @djelinski ? @jaikiran ? - PR Comment: https://git.openjdk.org/jdk/pull/20938#issuecomment-2379585126

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile()

2024-09-27 Thread sbgoog
On Tue, 10 Sep 2024 16:37:11 GMT, sbgoog wrote: > FIleSystemPreferences.lockFile() catches an InterruptedException and just > returns false, forgetting to re-interrupt the current thread. This leaves the > caller with no way to observe that the thread was interrupted. This change > restores th

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile()

2024-09-12 Thread Brian Burkhalter
On Tue, 10 Sep 2024 16:37:11 GMT, sbgoog wrote: > FIleSystemPreferences.lockFile() catches an InterruptedException and just > returns false, forgetting to re-interrupt the current thread. This leaves the > caller with no way to observe that the thread was interrupted. This change > restores th

RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile()

2024-09-10 Thread sbgoog
FIleSystemPreferences.lockFile() catches an InterruptedException and just returns false, forgetting to re-interrupt the current thread. This leaves the caller with no way to observe that the thread was interrupted. This change restores the interrupted status on the current thread before returnin