Details
-
Type:
Defect
-
Status:
Closed
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: Release 1.1
-
Component/s: None
-
Labels:None
-
Approval:Ok
Description
Added bound-fn macro to define a function, which saves away the current thread-local bindings. Before executing the body these bindings are restored. Useful for helper functions running on a different thread but requiring the same thread-local bindings.
For discussion see:
http://groups.google.com/group/clojure/browse_frm/thread/69367d3981de81d1
Needs patch from ticket:
https://www.assembla.com/spaces/clojure/tickets/169-thread-local-bindings-interface
Currently two fns are created. One wrapping the other into the necessary code. I also added the binding* helper function, because I missed it several times in my projects. So it may also be useful to others.
Converted from http://www.assembla.com/spaces/clojure/tickets/170
Attachments:
0002-Added-bound-fn-to-define-thread-local-binding-aware.patch - https://www.assembla.com/spaces/clojure/documents/btVJwSHgyr3QpHeJe5afGb/download/btVJwSHgyr3QpHeJe5afGb