Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Doing this in-memory in java via someAtomicLong.incrementAndGet() sounds appealing.

Just for fun, in Clojure:

    (def current-id (atom (long 0)))
    (defn get-id [] (swap! current-id inc))


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: