taoensso / carmine

Redis client + message queue for Clojure
https://www.taoensso.com/carmine
Eclipse Public License 1.0
1.15k stars 130 forks source link

atomic* now allows you to use a symbol to define connection minimums #165

Closed MysteryMachine closed 8 years ago

MysteryMachine commented 8 years ago

atomic*, as it is currently defined, does its assertion outside of the returned macro body. This causes it to throw an error whenever max-cas-attempts is a symbol. This commit simply moves the assertion inside the macro body, so that max-cas-attempts is given a chance to be evaluated before it is checked.

Not being able to use a symbol in this macro's been a pain point for us, so we'd love to see this fix get in. Let me know if you'd like me to structure the macro in a different way.

ptaoussanis commented 8 years ago

Hi Sal, thanks for bringing this to me - have just merged a similar commit w/o the indentation change.

MysteryMachine commented 8 years ago

Great to hear! Thanks!