{"id":24294523,"url":"https://github.com/miikka/long-thread","last_synced_at":"2025-09-25T20:31:30.033Z","repository":{"id":62433694,"uuid":"121527222","full_name":"miikka/long-thread","owner":"miikka","description":"Java threads in Clojure","archived":false,"fork":false,"pushed_at":"2023-06-04T09:45:25.000Z","size":92,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-17T21:39:57.718Z","etag":null,"topics":["clojure","concurrency","threading"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miikka.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-14T15:34:21.000Z","updated_at":"2023-06-04T07:27:54.000Z","dependencies_parsed_at":"2022-11-01T21:01:53.631Z","dependency_job_id":null,"html_url":"https://github.com/miikka/long-thread","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miikka%2Flong-thread","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miikka%2Flong-thread/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miikka%2Flong-thread/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miikka%2Flong-thread/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miikka","download_url":"https://codeload.github.com/miikka/long-thread/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234244243,"owners_count":18801885,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["clojure","concurrency","threading"],"created_at":"2025-01-16T17:47:16.617Z","updated_at":"2025-09-25T20:31:24.788Z","avatar_url":"https://github.com/miikka.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: 2018 Miikka Koskinen\nSPDX-License-Identifier: EPL-2.0\n--\u003e\n\n# long-thread [![cljdoc badge](https://cljdoc.org/badge/miikka/long-thread)](https://cljdoc.org/d/miikka/long-thread/CURRENT)\n\nA Clojure library for starting and stopping threads. Basically just a wrapper for\n`java.lang.Thread`.\n\n## Latest version\n\n[![Clojars Project](https://clojars.org/miikka/long-thread/latest-version.svg)](https://clojars.org/miikka/long-thread)\n\n## Why?\n\nClojure has plenty fancy tools such as futures for concurrent programming.\nHowever, sometimes what you need is a good old thread. You could use Java's\n`Thread` directly, but the purpose of this wrapper is to encourage good\npractices such as always naming your threads.\n\n## Usage\n\n* [API reference](https://cljdoc.org/d/miikka/long-thread/CURRENT)\n\n```clojure\n(ns example.core\n  (:require [long-thread.core :as long-thread]))\n\n(defn my-loop\n  []\n  (long-thread/until-interrupted\n    (println \"This is your regularly scheduled greeting: Hello!\")\n    (Thread/sleep 1000)))\n\n(defn main\n  []\n  (let [my-thread (long-thread/create \"greetings thread\" my-loop)]\n    (println \"Press enter to stop...\")\n    (read-line)\n    (long-thread/stop my-thread)))\n```\n\n## Acknowledgements\n\nThe inspiration for this work is `zthread.clj`, a similar library developed by\nJoel Kaasinen and others at ZenRobotics.\n\n## See also\n\n* For value-returning one-off tasks, see Clojure's futures, [manifold's futures](http://aleph.io/manifold/deferreds.html#future-vs-manifold-deferred-future), or [java.util.concurrent.ExecutorService](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ExecutorService.html).\n* For scheduled tasks (e.g. run once in every minute), see [manifold.time](https://aleph.io/codox/manifold/manifold.time.html), Duct's [scheduler.simple](https://github.com/duct-framework/scheduler.simple), and [ScheduledThreadPoolExecutor](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledThreadPoolExecutor.html).\n\n## Development guide\n\n* Run tests with `lein test`\n* Generate a test coverage report with `lein cloverage` and look at `target/coverage/index.html`.\n\n## License\n\nCopyright Miikka Koskinen.\n\nAvailable under the terms of the Eclipse Public License 2.0, see `LICENSES/EPL-2.0.txt`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiikka%2Flong-thread","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiikka%2Flong-thread","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiikka%2Flong-thread/lists"}