push-thread-bindings

clojure.core

  • (push-thread-bindings bindings)
WARNING: This is a low-level function. Prefer high-level macros like
binding where ever possible.

Takes a map of Var/value pairs. Binds each Var to the associated value for
the current thread. Each call *MUST* be accompanied by a matching call to
pop-thread-bindings wrapped in a try-finally!

(push-thread-bindings bindings)
(try
...
(finally
(pop-thread-bindings)))

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:1700 top

(defn push-thread-bindings
  "WARNING: This is a low-level function. Prefer high-level macros like
  binding where ever possible.

  Takes a map of Var/value pairs. Binds each Var to the associated value for
  the current thread. Each call *MUST* be accompanied by a matching call to
  pop-thread-bindings wrapped in a try-finally!
  
      (push-thread-bindings bindings)
      (try
        ...
        (finally
          (pop-thread-bindings)))"
  {:added "1.1"
   :static true} 
  [bindings]
  (clojure.lang.Var/pushThreadBindings bindings))
Vars in clojure.core/push-thread-bindings:
Used in 0 other vars

Comments top

No comments for push-thread-bindings. Log in to add a comment.