* Re: emacs-29 bbe35c280c: Prevent stale servers when using eglot-extend-to-xref [not found] ` <20221222112935.58A32C05F44@vcs2.savannah.gnu.org> @ 2022-12-22 15:08 ` Stefan Monnier 2022-12-22 15:30 ` João Távora 0 siblings, 1 reply; 4+ messages in thread From: Stefan Monnier @ 2022-12-22 15:08 UTC (permalink / raw) To: João Távora; +Cc: emacs-devel > A weak-valued hash-table is not enough to guarantee that a reference > to a zombie server in eglot--servers-by-xrefed-file variable won't > survive long enough to confuse the next call to eglot--current-server > in some buffers. [...] > +(defvar eglot--servers-by-xrefed-file > + (make-hash-table :test 'equal :weakness 'value)) Do we still need it to be weak? Stefan ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs-29 bbe35c280c: Prevent stale servers when using eglot-extend-to-xref 2022-12-22 15:08 ` emacs-29 bbe35c280c: Prevent stale servers when using eglot-extend-to-xref Stefan Monnier @ 2022-12-22 15:30 ` João Távora 2022-12-22 15:40 ` Stefan Monnier 0 siblings, 1 reply; 4+ messages in thread From: João Távora @ 2022-12-22 15:30 UTC (permalink / raw) To: Stefan Monnier; +Cc: emacs-devel [-- Attachment #1: Type: text/plain, Size: 667 bytes --] > > A weak-valued hash-table is not enough to guarantee that a reference > > to a zombie server in eglot--servers-by-xrefed-file variable won't > > survive long enough to confuse the next call to eglot--current-server > > in some buffers. > [...] > > +(defvar eglot--servers-by-xrefed-file > > + (make-hash-table :test 'equal :weakness 'value)) > Do we still need it to be weak? Prolly not, if we presume the operations running up to the new cleanup can't throw. Probably a fair assumption. But better be safe? Does value-weakness in a typically small hash table hurt GC significantly somehow? Anyway, feel free to remove. João [-- Attachment #2: Type: text/html, Size: 893 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs-29 bbe35c280c: Prevent stale servers when using eglot-extend-to-xref 2022-12-22 15:30 ` João Távora @ 2022-12-22 15:40 ` Stefan Monnier 2022-12-22 15:43 ` João Távora 0 siblings, 1 reply; 4+ messages in thread From: Stefan Monnier @ 2022-12-22 15:40 UTC (permalink / raw) To: João Távora; +Cc: emacs-devel >> Do we still need it to be weak? > Prolly not, if we presume the operations running up to the new cleanup > can't throw. Probably a fair assumption. But better be safe? The usual tension between trying to silently push the unexpected corner case under the rug vs trying to avoid those corner cases staying unnoticed. > Does value-weakness in a typically small hash table hurt GC > significantly somehow? I'd doubt it. They do come at a cost, of course, but so does everything. Stefan ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: emacs-29 bbe35c280c: Prevent stale servers when using eglot-extend-to-xref 2022-12-22 15:40 ` Stefan Monnier @ 2022-12-22 15:43 ` João Távora 0 siblings, 0 replies; 4+ messages in thread From: João Távora @ 2022-12-22 15:43 UTC (permalink / raw) To: Stefan Monnier; +Cc: emacs-devel [-- Attachment #1: Type: text/plain, Size: 484 bytes --] On Thu, Dec 22, 2022 at 3:40 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote: > >> Do we still need it to be weak? > > Prolly not, if we presume the operations running up to the new cleanup > > can't throw. Probably a fair assumption. But better be safe? > > The usual tension between trying to silently push the unexpected corner > case under the rug vs trying to avoid those corner cases > staying unnoticed. > Yeah, you're right. Let's do the latter. João [-- Attachment #2: Type: text/html, Size: 856 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-12-22 15:43 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <167170857225.23253.4229481345211602184@vcs2.savannah.gnu.org> [not found] ` <20221222112935.58A32C05F44@vcs2.savannah.gnu.org> 2022-12-22 15:08 ` emacs-29 bbe35c280c: Prevent stale servers when using eglot-extend-to-xref Stefan Monnier 2022-12-22 15:30 ` João Távora 2022-12-22 15:40 ` Stefan Monnier 2022-12-22 15:43 ` João Távora
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).