summaryrefslogtreecommitdiff
path: root/src/clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/clj')
-rw-r--r--src/clj/clojure/core.clj13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/clj/clojure/core.clj b/src/clj/clojure/core.clj
index 6527f926..caa3669a 100644
--- a/src/clj/clojure/core.clj
+++ b/src/clj/clojure/core.clj
@@ -1299,7 +1299,7 @@
(. ref (touch))
(. ref (get)))
-(def #^{:tag clojure.lang.Closer} *io-context* nil)
+(def *io-context* nil)
(defmacro sync
"transaction-flags => TBD, pass nil for now
@@ -1316,8 +1316,6 @@
(. clojure.lang.LockingTransaction
(runInTransaction (fn [] ~@body)))))
-
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; fn stuff ;;;;;;;;;;;;;;;;
@@ -1995,17 +1993,14 @@
"If an io! block occurs in a transaction, throws an
IllegalStateException, else runs body in an implicit do. If the
first expression in body is a literal string, will use that as the
- exception message. Establishes a dynamic io context for use with io-scope."
+ exception message."
[& body]
(let [message (when (string? (first body)) (first body))
body (if message (rest body) body)]
`(if (clojure.lang.LockingTransaction/isRunning)
(throw (new IllegalStateException ~(or message "I/O in transaction")))
- (binding [*io-context* (clojure.lang.Closer.)]
- (try
- ~@body
- (finally
- (.close *io-context*)))))))
+ (binding [*io-context* true]
+ ~@body))))
(def *scope* nil)