Created
February 10, 2017 16:30
-
-
Save bhauman/b6d71c1c4fb3648b00c80803c56c8f6f to your computer and use it in GitHub Desktop.
demonstrating where to place thread/interupted
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From: Bruce Hauman <bhauman@gmail.com> | |
Date: Fri, 10 Feb 2017 11:26:46 -0500 | |
Subject: [PATCH] CLJS-ThreadIterrupt: Check for thread interuptions for | |
cleaner shutdown in some cases | |
--- | |
src/main/clojure/cljs/repl.cljc | 12 +++++++----- | |
1 file changed, 7 insertions(+), 5 deletions(-) | |
diff --git a/src/main/clojure/cljs/repl.cljc b/src/main/clojure/cljs/repl.cljc | |
index a223812..fc2a3f8 100644 | |
--- a/src/main/clojure/cljs/repl.cljc | |
+++ b/src/main/clojure/cljs/repl.cljc | |
@@ -892,11 +892,13 @@ | |
(flush) | |
(loop [] | |
(when-not | |
- (try | |
- (identical? (read-eval-print) request-exit) | |
- (catch Throwable e | |
- (caught e repl-env opts) | |
- nil)) | |
+ (or | |
+ (Thread/interrupted) | |
+ (try | |
+ (identical? (read-eval-print) request-exit) | |
+ (catch Throwable e | |
+ (caught e repl-env opts) | |
+ nil))) | |
(when (need-prompt) | |
(prompt) | |
(flush)) | |
-- | |
2.6.4 (Apple Git-63) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment