Skip to content

Commit 6add493

Browse files
Improve comment
Co-authored-by: Jacob Maine <jacob.maine@gmail.com>
1 parent 85d1a8a commit 6add493

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/lsp4clj/server.clj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,12 @@
352352
(do
353353
(trace this trace/received-response req resp started now)
354354
;; Note that we are called from the server's pipeline, a core.async
355-
;; go-loop, and therefore must not block. Callbacks of the pending
356-
;; request's promise will be executed in the completing thread,
357-
;; which should not be our thread. This is very easy for users to
355+
;; go-loop, and therefore must not block. Callbacks of the pending
356+
;; request's promise (`p`) will be executed in the completing
357+
;; thread, whatever that thread is. Since the callbacks are not
358+
;; under our control, they are under our users' control, they could
359+
;; block. Therefore, we do not want the completing thread to be our
360+
;; thread. This is very easy for users to
358361
;; miss, therefore we complete the promise on the default executor.
359362
(p/thread-call :default
360363
(fn []

0 commit comments

Comments
 (0)