[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66993: [PATCH] project.el: avoid asking user about project-list-file
From: |
Spencer Baugh |
Subject: |
bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock |
Date: |
Wed, 08 Nov 2023 10:41:15 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Wed, 8 Nov 2023 15:56:11 +0200
>> Cc: sbaugh@janestreet.com, 66993@debbugs.gnu.org
>> From: Dmitry Gutov <dmitry@gutov.dev>
>>
>> On 08/11/2023 15:50, Eli Zaretskii wrote:
>> > Why do you need an error when you can use file-locked-p to check up
>> > front that the file is locked?
>>
>> IIUC the problem comes due to concurrent writes from concurrent writes
>> from parallel Emacs instances.
>>
>> Simply checking whether the file is locked before writing, without
>> trying to obtain the lock, is unlikely to be a reliable solution
>> (another instance might lock it right after we checked).
>>
>> Anyway, these writes must be very fast and relatively infrequent. So I'm
>> surprised that this has came up, personally.
>
> If that's the case, just catch the error and retry, several times,
> perhaps with variable delays.
Perhaps, but it would be nice to do that by catching specifically
file-locked rather than catching all errors. Which is something which
can't be done right now, other than with the cl-flet approach in my
original approach.
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock, (continued)
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock, Eli Zaretskii, 2023/11/08
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock, Dmitry Gutov, 2023/11/08
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock, Eli Zaretskii, 2023/11/08
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock, Dmitry Gutov, 2023/11/08
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock, Eli Zaretskii, 2023/11/08
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock,
Spencer Baugh <=
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock, Eli Zaretskii, 2023/11/08
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock, Spencer Baugh, 2023/11/08
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock, Eli Zaretskii, 2023/11/08
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock, Spencer Baugh, 2023/11/08
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock, Eli Zaretskii, 2023/11/09
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock, Spencer Baugh, 2023/11/09
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock, Eli Zaretskii, 2023/11/09
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock, Spencer Baugh, 2023/11/09
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock, Eli Zaretskii, 2023/11/09
- bug#66993: [PATCH] project.el: avoid asking user about project-list-file lock, Spencer Baugh, 2023/11/10