Skip to content

Commit

Permalink
eliminate :interrupted status race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
cemerick committed Feb 14, 2012
1 parent f392614 commit f955b8c
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -97,10 +97,13 @@
(if-not thread
(t/send transport (response-for msg :status #{:done :session-idle}))
(do
(.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 clojure.tools.nrepl/message 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}))))

Expand Down

0 comments on commit f955b8c

Please sign in to comment.