{"id":16464981,"url":"https://github.com/sellmair/looper","last_synced_at":"2025-02-27T12:38:35.779Z","repository":{"id":135055999,"uuid":"147203404","full_name":"sellmair/looper","owner":"sellmair","description":"A simple Android Looper-Thread implementation","archived":false,"fork":false,"pushed_at":"2018-09-23T15:50:49.000Z","size":145,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-10T10:33:17.301Z","etag":null,"topics":["android","android-lib","android-library","kotlin","kotlin-library","looper","thread","threading"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sellmair.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-03T12:40:32.000Z","updated_at":"2021-09-18T23:03:17.000Z","dependencies_parsed_at":"2024-04-18T23:34:03.836Z","dependency_job_id":null,"html_url":"https://github.com/sellmair/looper","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sellmair%2Flooper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sellmair%2Flooper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sellmair%2Flooper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sellmair%2Flooper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sellmair","download_url":"https://codeload.github.com/sellmair/looper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241014098,"owners_count":19894190,"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":["android","android-lib","android-library","kotlin","kotlin-library","looper","thread","threading"],"created_at":"2024-10-11T11:31:08.576Z","updated_at":"2025-02-27T12:38:35.759Z","avatar_url":"https://github.com/sellmair.png","language":"Kotlin","readme":"# Looper \nA simple Looper-Thread implementation for Android\n\n![GitHub top language](https://img.shields.io/github/languages/top/sellmair/looper.svg)\n[![Build Status](https://travis-ci.org/sellmair/looper.svg?branch=develop)](https://travis-ci.org/sellmair/looper)\n![Bintray](https://img.shields.io/bintray/v/sellmair/sellmair/looper.svg)\n\n\n## Usage\n\n##### gradle\n```groovy\ndependencies { \n    implement \"io.sellmair:looper:1.0.0-RC.0\"\n}\n```\n\n##### Starting the thread\n\n```kotlin\nval thread = LooperThread.start()\n```\n\n##### Wait for startup\n```kotlin\n// Current thread will wait until looper thread is fully booted\nthread.awaitStartup()\n```\n\n##### Executing \n```kotlin\n\n// Dispatches a task to the looper thread\n// If thread is not started: Will be queued and \n// executed once the thread started.\nthread.execute {\n     print(\"I will be executed by the looper thread\")\n}\n\n```\n\n##### Getting a Handler\n```kotlin\n// Will be null if the thread is not yet started\nval handler = thread.handler\n\n// Never null: Will wait for thread to start up if necessary\n// Is cheap if thread is already started\nval handler = thread.handler()\n```\n\n##### Stopping the thread\n```kotlin\nthread.quit() // will discard all pending messages\nthread.quitSafely() // will process all currently pending messages first\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsellmair%2Flooper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsellmair%2Flooper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsellmair%2Flooper/lists"}