Public Vars

Back

get-thread-bindings (clj)

(source)

function

(get-thread-bindings)
Get a map with the Var/value pairs which is currently in effect for the current thread.

Examples

typedclojure/typedclojure
(ns ^:no-doc typed.ann.clojure
  "Type annotations for the base Clojure distribution."
  #?(:cljs (:require-macros [typed.ann-macros.clojure :as macros]))
  (:require [clojure.core :as cc]
            [typed.clojure :as t]
            #?(:clj [typed.ann-macros.clojure :as macros])
            #?(:clj typed.ann.clojure.jvm) ;; jvm annotations
            #?(:clj clojure.core.typed))
  #?(:clj
     (:import (clojure.lang PersistentHashSet PersistentList
                            APersistentMap #_IPersistentCollection
                            #_ITransientSet
                            IRef)
              (java.util Comparator Collection))))

#?@(:cljs [] :default [
cc/get-thread-bindings [:-> (t/Map t/AnyVar t/Any)]
cc/bound-fn*
    (t/All [r b :..]
         [[b :.. b :-> r] :-> [b :.. b :-> r]])
cc/find-var
    [t/Sym :-> (t/Nilable t/AnyVar)]
cc/agent
    (t/All [x] [x & :optional {:validator (t/Nilable [x :-> t/Any]) :meta t/Any
                               :error-handler (t/Nilable [(t/Agent x) Throwable :-> t/Any])
                               :error-mode (t/U ':continue ':fail)} 
                :-> (t/Agent x)])
cc/set-agent-send-executor! [java.util.concurrent.ExecutorService :-> t/Any]
cc/set-agent-send-off-executor! [java.util.concurrent.ExecutorService :-> t/Any]
cc/send-via (t/All [x b :..] [(t/Agent x) [x b :.. b :-> x] b :.. b :-> (t/Agent x)])
cc/send (t/All [x b :..] [(t/Agent x) [x b :.. b :-> x] b :.. b :-> (t/Agent x)])
cc/send-off (t/All [x b :..] [(t/Agent x) [x b :.. b :-> x] b :.. b :-> (t/Agent x)])
cc/await [t/AnyAgent :* :-> nil]
cc/await-for [t/AnyInteger t/AnyAgent :* :-> t/Bool]
cc/await1 (t/All [[a :< t/AnyAgent]] [a :-> (t/Nilable a)])
cc/release-pending-sends [:-> t/AnyInteger]
])