Skip to content

Commit

Permalink
Set version to 10.0.570
Browse files Browse the repository at this point in the history
  • Loading branch information
niwinz committed Dec 5, 2022
1 parent 7d44ef1 commit 090dca2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog #

## Version 10.0.569
## Version 10.0.570

- Add `promesa.exec.csp/mult*` alternative multiplexer constructor
more similar to the `clojure.core.async/mult` one
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ Here you can look a detailed [documentation][1].
deps.edn:

```clojure
funcool/promesa {:mvn/version "10.0.569"}
funcool/promesa {:mvn/version "10.0.570"}
```

Leiningen:

```clojure
[funcool/promesa "10.0.569"]
[funcool/promesa "10.0.570"]
```

## On the REPL
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "promesa",
"version": "9.0",
"version": "10.0",
"description": "-",
"author": "-",
"license": "SEE LICENSE IN <LICENSE>",
Expand Down
6 changes: 4 additions & 2 deletions src/promesa/util.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
(-lock! [_])
(-unlock! [_]))))

#?(:clj
(defn count-down-latch
[n]
(let [cdown (CountDownLatch. (int n))]
Expand All @@ -90,13 +91,14 @@
(invoke [_ _]
(.countDown ^CountDownLatch cdown))
(invoke [_ _ _]
(.countDown ^CountDownLatch cdown)))))
(.countDown ^CountDownLatch cdown))))))

#?(:clj
(defn wait-all!
[promises]
(let [total (count promises)]
(when (pos? total)
(let [cdown-fn (count-down-latch total)]
(doseq [p promises]
(pt/-finally p cdown-fn))
(pt/-await cdown-fn)))))
(pt/-await cdown-fn))))))

0 comments on commit 090dca2

Please sign in to comment.