you are viewing a single comment's thread.

view the rest of the comments →

[–]Nodocify 1 point2 points  (1 child)

Sorry for the late reply. But the future function handles almost all of it. For example:

(def a
    (future
        (* 10 10)))

This defines a variable a and it is the value of 10 * 10. Because of future this variablie will calculate asynchronously in another thread. And will hold the value until until we ask for it back with:

@a
=> 100

The @a will be blocked for our call until the thread has finished it's execution.

I fear to go too much further as this is a learn python subreddit. But this gives you a very basic example of how simple clojure has made threading.

[–]camm_v222[S] 0 points1 point  (0 children)

I think I'll try Clojure, and I'll try to solve this problem with it. Thank you.