{"id":32191185,"url":"https://github.com/conquerant-project/conquerant","last_synced_at":"2026-02-19T08:34:56.679Z","repository":{"id":62435433,"uuid":"158946298","full_name":"conquerant-project/conquerant","owner":"conquerant-project","description":"lightweight async/await for Clojure","archived":false,"fork":false,"pushed_at":"2022-12-23T04:47:10.000Z","size":74,"stargazers_count":33,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-14T07:39:34.793Z","etag":null,"topics":["async-await","clojure","concurrency","library","promise"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conquerant-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-24T14:54:53.000Z","updated_at":"2024-05-31T07:57:35.000Z","dependencies_parsed_at":"2023-01-30T17:46:06.664Z","dependency_job_id":null,"html_url":"https://github.com/conquerant-project/conquerant","commit_stats":null,"previous_names":["divs1210/conquerant"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/conquerant-project/conquerant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conquerant-project%2Fconquerant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conquerant-project%2Fconquerant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conquerant-project%2Fconquerant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conquerant-project%2Fconquerant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conquerant-project","download_url":"https://codeload.github.com/conquerant-project/conquerant/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conquerant-project%2Fconquerant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29608562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async-await","clojure","concurrency","library","promise"],"created_at":"2025-10-22T01:34:18.255Z","updated_at":"2026-02-19T08:34:56.671Z","avatar_url":"https://github.com/conquerant-project.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# conquerant\n\n**async/await for Clojure**\n\n[![Clojars Project](https://img.shields.io/clojars/v/conquerant.svg)](https://clojars.org/conquerant) [![Build Status](https://travis-ci.com/divs1210/conquerant.svg?branch=master)](https://travis-ci.com/divs1210/conquerant) [![codecov](https://codecov.io/gh/divs1210/conquerant/branch/master/graph/badge.svg)](https://codecov.io/gh/divs1210/conquerant)\n\nA lightweight Clojure wrapper around `ForkJoinPool` and `CompletableFuture`\nfor concurrency that is simple *and* easy.\n\n## Why\n\n**`core.async`**\n- is very powerful, but quite low-level by design\n- and the source is hard to follow\n- we don't always want this kind of power\n- doesn't allow using [custom threadpools](https://dev.clojure.org/jira/browse/ASYNC-94)\n- breaks on [function boundaries](https://github.com/clojure/core.async/wiki/Go-Block-Best-Practices)\n- [breaks emacs](https://github.com/clojure-emacs/cider/issues/1827)\n\n## Usage\n\n```clojure\n;; Async HTTP Exaxmple\n;; ===================\n(refer-clojure :exclude '[await promise])\n(require '[clj-http.client :as client]\n         '[conquerant.core :refer [async await promise]])\n\n(def url \"https://gist.githubusercontent.com/divs1210/2ce84f3707b785a76d225d23f18c4904/raw/2dedab13201a8a8a2c91c3800040c84b70fef2e2/data.edn\")\n\n(defn fetch [url]\n  (promise [resolve]\n    (client/get url\n                {:async? true}\n                (fn [response]\n                  (resolve [response nil]))\n                (fn [error]\n                  (resolve [nil error])))))\n\n(async\n  (let [[response error] (await (fetch url))]\n    (if error\n      (println \"Error:\" (.getMessage error))\n      (println \"Response Body:\" (:body response)))))\n\n(println \"fetching asynchronously...\")\n;; =\u003e fetching asynchronously...\n;; =\u003e Response Body: {:result 1}\n```\n\n- **`promise`**\n  - gets value out of callback\n  - runs body on a lightweight thread, returning a `CompletableFuture`\n  - can be resolved from outside via `complete`\n  - can be `deref`ed: `@(promise [resolve] (resolve :hi))`\n  - can run on a custom `ExecutorService` using `with-async-executor`\n\n- **`async`**\n  - runs body on a lightweight thread\n    - can wrap `defn` and `fn` forms - supports variadic versions\n    ```clojure\n    (async (defn f\n             ([a]\n               (inc a))\n             ([a b]\n               (* a b))))\n    ```\n    - any other expression, returning a `CompletableFuture` (`promise`)\n    ```clojure\n    @(async [1 2]) ;; =\u003e [1 2]\n    ```\n  - can run on a custom `ExecutorService` using `with-async-executor`\n\n- **`await`**\n  - pauses the lightweight thread till the given promise is complete\n  - can only be used in `async` `let` bindings\n    - normal `let` block anywhere inside an `async` block\n    - every `let` block with a call to `await` returns a `CompletableFuture`\n  - works across function boundaries\n  - can timeout like `deref`: `(await p 1000 :timeout)`\n\n- **`channels`**\n  - supports `core.async`-like [channel operations](src/conquerant/channels.clj)! ***(experimental!)***\n\n## Walkthrough\n\nClone this repo, fire up a REPL, and walk through the [conquerant walkthrough](examples/walkthrough.clj).\n\n## License\n\nCopyright © 2018 Divyansh Prakash\n\nDistributed under the Eclipse Public License either version 1.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconquerant-project%2Fconquerant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconquerant-project%2Fconquerant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconquerant-project%2Fconquerant/lists"}