Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

eliminate :interrupted status race condition

  • Loading branch information...
commit f955b8c809fe1bae057b6eda8a4c69f3dbd3c213 1 parent f392614
@cemerick cemerick authored
5 src/main/clojure/clojure/tools/nrepl/middleware/interruptible_eval.clj
@@ -97,10 +97,13 @@
(if-not thread
(t/send transport (response-for msg :status #{:done :session-idle}))
- (.stop thread)
+ ; notify of the interrupted status before we .stop the thread so
+ ; it is received before the standard :done status (thereby ensuring
+ ; that is stays within the scope of a seq
(t/send transport {:status #{:interrupted}
:id (:id eval-msg)
:session id})
+ (.stop thread)
(t/send transport (response-for msg :status #{:done}))))
(t/send transport (response-for msg :status #{:error :interrupt-id-mismatch :done}))))
Please sign in to comment.
Something went wrong with that request. Please try again.