(brute-threads! col)
Inputs: [col :- [t/Fn]] Returns: [s/Any]
Simplest of them all. For each function in col a future thread with be fired, all results will be joined in the end and provided back as a vector of the results. Use this if the col is small enough that the number of threads fired can be handled from the cpu/memory perspective. eg: Cpu intensive operations a small number roughly equal to the number of CPU cores available will be a fit. IO blocking operations like network calls can be a good fit for the hundreds as well, but at the cost of memory for the threads.
Inputs: [col :- [t/Fn]] Returns: [s/Any] Simplest of them all. For each function in col a future thread with be fired, all results will be joined in the end and provided back as a vector of the results. Use this if the col is small enough that the number of threads fired can be handled from the cpu/memory perspective. eg: Cpu intensive operations a small number roughly equal to the number of CPU cores available will be a fit. IO blocking operations like network calls can be a good fit for the hundreds as well, but at the cost of memory for the threads.
cljdoc builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |